+
+ /* closelog(); - WRONG. we are after vfork,
+ * this may confuse syslog() internal state.
+ * Let's hope libc sets syslog fd to CLOEXEC...
+ */
+ xmove_fd(ctrl, STDIN_FILENO);
+ xdup2(STDIN_FILENO, STDOUT_FILENO);
+ dbg("moved ctrl:%d to fd 0,1[,2]\n", ctrl);
+ /* manpages of inetd I managed to find either say
+ * that stderr is also redirected to the network,
+ * or do not talk about redirection at all (!) */
+ if (!sep->se_wait) /* only for usual "tcp nowait" */
+ xdup2(STDIN_FILENO, STDERR_FILENO);
+ /* NB: among others, this loop closes listening sockets