[dovecot-cvs] dovecot/src/master mail-process.c,1.51,1.52
cras at procontrol.fi
cras at procontrol.fi
Sun Jun 20 00:29:41 EEST 2004
Update of /home/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv12902
Modified Files:
mail-process.c
Log Message:
cleanup
Index: mail-process.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/mail-process.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- mail-process.c 16 Jun 2004 02:04:02 -0000 1.51
+++ mail-process.c 19 Jun 2004 21:29:39 -0000 1.52
@@ -252,8 +252,7 @@
child_process_init_env();
- /* move the client socket into stdin and stdout fds */
- fd_close_on_exec(socket, FALSE);
+ /* move the client socket into stdin and stdout fds, log to stderr */
if (dup2(socket, 0) < 0)
i_fatal("dup2(stdin) failed: %m");
if (dup2(socket, 1) < 0)
@@ -261,8 +260,8 @@
if (dup2(log_fd, 2) < 0)
i_fatal("dup2(stderr) failed: %m");
- if (close(socket) < 0)
- i_error("close(mail client) failed: %m");
+ for (i = 0; i < 3; i++)
+ fd_close_on_exec(i, FALSE);
/* setup environment - set the most important environment first
(paranoia about filling up environment without noticing) */
More information about the dovecot-cvs
mailing list