Displaying 2 results from an estimated 2 matches for "fd_close_on_exec".
2005 Aug 22
2
Re: Dovecot inotify problem
...", io->notify_context, ctx->inotify_fd);
if (inotify_rm_watch(ctx->inotify_fd, io->notify_context) < 0)
Or something similar.
If that doesn't help and output looks consistent (we're not removing a
watch descriptor from a wrong fd etc.), can you try removing the
fd_close_on_exec call please (line 171)? I don't know if that could
cause trouble (I don't even think that the imap binary ever forks) but
you never know.
johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 byt...
2011 Jan 06
1
Dovecot 2.0.7 doesn't disassociate STDERR when it daemonizes.
...derr 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 later dup2() is used to release any
inherited values not covered by the above:
if (dup2(null_fd, STDIN_FILENO) < 0 ||
dup2(null_fd, STDOUT_FILENO) < 0)
i_fatal(&quo...