[dovecot-cvs] dovecot/src/master main.c,1.80.2.11,1.80.2.12
cras at dovecot.org
cras at dovecot.org
Thu Aug 17 21:17:40 EEST 2006
Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv9735
Modified Files:
Tag: branch_1_0
main.c
Log Message:
Cleanup + handle dup() failure.
Index: main.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/main.c,v
retrieving revision 1.80.2.11
retrieving revision 1.80.2.12
diff -u -d -r1.80.2.11 -r1.80.2.12
--- main.c 10 Aug 2006 18:46:21 -0000 1.80.2.11
+++ main.c 17 Aug 2006 18:17:38 -0000 1.80.2.12
@@ -426,8 +426,8 @@
if (*fd == -1)
i_fatal("listen(%d) failed: %m", port);
net_set_nonblock(*fd, TRUE);
+ fd_close_on_exec(*fd, TRUE);
}
- fd_close_on_exec(*fd, TRUE);
}
if (set->listen_fd == -1)
@@ -508,6 +508,8 @@
/* make sure all fds between 0..3 are used. */
while (null_fd < 4) {
null_fd = dup(null_fd);
+ if (null_fd == -1)
+ i_fatal("dup(null_fd) failed: %m");
fd_close_on_exec(null_fd, TRUE);
}
More information about the dovecot-cvs
mailing list