[Gllug] Broken xinetd?

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


[ ... ]

>> 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.

sanelson> So xinetd does not have stdout and stderr on file
sanelson> descriptors 1 and 2?

It all depends on what you mean by «have stdout and stderr». In
the UNIX API, "stdin", "stdout" and "stderr" are just names used
by convention to refer to file descriptors 0, 1 and 2; and it is
merely another convention that such file descriptors be used in
a certain traditional way.

'xinetd' seems designed not to behave according to that
convention (because the convention is mostly meant to be
meaningful for shell scriptable commands, not standalone
dæmons), and not to write anything to fd 1 and 2, but to log
instead to whatever fd is returned by opening '/dev/tty'.

[ ... ]

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




More information about the GLLUG mailing list