in reply to Re: xinetd and perl
in thread xinetd and perl

in case anyone was wondering, to use xinetd to act as a super server for your code, you need to add the following kind of thing to a new file (call it what you want to. I'd suggest something descriptive) in /etc/xinetd.d/
service servermon { disable = no socket_type = stream wait = no user = root instances = 3 server = /home/backup/servermon/monitord.pl log_on_failure += USERID }
and the following kind of line at the bottom of /etc/services
servermon 2345/tcp
(the name of the service has to match the name in ect services, or you have to give more details.man xinetd.conf is fairly explanetory)
then your program just has to read and write to stdin and stdout. (stderr is also redirected.) The bit that caught me was, you need to make sure that stdio is flushing its cache. $|=1; will do this for you.