[Gllug] Broken xinetd?

Peter Grandi pg_gllug at gllug.for.sabi.co.UK
Thu Oct 27 15:41:33 UTC 2005


>>> On Thu, 27 Oct 2005 16:25:06 +0100, Steve Nelson
>>> <sanelson at gmail.com> 

sanelson> [ ... 'xinetd' ] with the -d flag is supposed to
sanelson> produce debug input on stdout. This worked, in so far
sanelson> as debug output appeared on the screen.... I attempted
sanelson> to then redirect stdout to a file, but to no avail.
sanelson> Thinking perhaps the info was on stderr I redirected
sanelson> this too, but still collected no data.

sanelson> close(1023)                             = -1 [ ... ]
sanelson> open(/dev/tty, O_WRONLY|O_APPEND)     = 3 [ ... ]

sanelson> To my untrained eye, this looks like a failure to
sanelson> allocate a file descriptor, and a fallback to send
sanelson> data to the console (and thus not be capturable using
sanelson> standard file descriptors). [ ... ]

It just closes all existing fds, opens 0 and 1 on '/dev/null'
(just-in-case), and then starts logging to '/dev/tty', just like
many programs designed for backgrounding do. 'script' has been
written more or less to handle this case; 'screen' can also be
used.

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list