tcpserver has no use for stdin, so it closes fd 0, but does it too late:

(tcpserver.c)

line 369: s = socket_tcp();
line 394: close(0);

This closes s when the program is launched with fd 0 closed. Nothing
in the documentation suggests that closing stdin before launching a
tcpserver based service is fatal. Am I missing something? (As in: is
it a general assumption that a service must inherit the usual 3 file
descriptors?)

Jorge Almeida

Reply via email to