[OT] bug in tcpserver?

From: Jorge Almeida <jjalmeida_at_gmail.com>
Date: Thu, 14 Sep 2017 11:23:34 +0100

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
Received on Thu Sep 14 2017 - 10:23:34 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC