Displaying 1 result from an estimated 1 matches for "null_fd".
2011 Jan 06
1
Dovecot 2.0.7 doesn't disassociate STDERR when it daemonizes.
...as part of its daemonization. Although
cfengine could be more defensive, I believe dovecot should be
disassociating from the inherited stderr.
Looking at master/main.c, I see stdin, stdout & stderr being set to
/dev/null in main() if they are inherited unassigned:
do {
null_fd = open("/dev/null", O_WRONLY);
if (null_fd == -1)
i_fatal("Can't open /dev/null: %m");
fd_close_on_exec(null_fd, TRUE);
} while (null_fd <= STDERR_FILENO);
But stderr is missing when a...