[dovecot-cvs] dovecot/src/master mail-process.c,1.111,1.112

tss at dovecot.org tss at dovecot.org
Wed Jan 24 17:39:14 UTC 2007


Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv18626

Modified Files:
	mail-process.c 
Log Message:
If exec() fails, don't close 0..3 fds before logging the error. There's
really no point, and it closes the logging fd so the exec() error can't be
logged.



Index: mail-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/mail-process.c,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -d -r1.111 -r1.112
--- mail-process.c	18 Jan 2007 16:57:45 -0000	1.111
+++ mail-process.c	24 Jan 2007 17:39:11 -0000	1.112
@@ -408,7 +408,7 @@
 	gid_t gid;
 	ARRAY_DEFINE(extra_args, const char *);
 	unsigned int i, count;
-	int err, ret, log_fd, nice;
+	int ret, log_fd, nice;
 	bool home_given, nfs_check;
 
 	// FIXME: per-group
@@ -655,12 +655,6 @@
 		restrict_access_by_env(TRUE);
 
 	client_process_exec(set->mail_executable, title);
-	err = errno;
-
-	for (i = 0; i < 3; i++)
-		(void)close(i);
-
-	errno = err;
 	i_fatal_status(FATAL_EXEC, "execv(%s) failed: %m",
 		       set->mail_executable);
 



More information about the dovecot-cvs mailing list