[evolution-patches] fork/exec close -> fcntl fix



Jeff

-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com  - www.ximian.com
? 24026.patch
? 49357.patch
? charset-map.c
? close-fcntl.patch
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.1836.2.21
diff -u -r1.1836.2.21 ChangeLog
--- ChangeLog	6 Nov 2003 16:23:06 -0000	1.1836.2.21
+++ ChangeLog	1 Dec 2003 15:55:31 -0000
@@ -1,3 +1,16 @@
+2003-12-01  Jeffrey Stedfast  <fejj ximian com>
+
+	* camel-process.c (camel_process_fork): Same.
+
+	* camel-filter-search.c (run_command): Same as below.
+
+	* camel-filter-driver.c (pipe_to_system): Same as below.
+
+	* camel-gpg-context.c (gpg_ctx_op_start): Use fcntl() to set
+	FD_CLOEXEC on each fd rather than close()ing it. Apparently
+	Linux's older pthread implementations use sockets and so this
+	fouls threading up. GO LINUX! GO!
+
 2003-11-05  Jeffrey Stedfast  <fejj ximian com>
 
 	* providers/smtp/camel-smtp-transport.c (connect_to_server): Don't
Index: camel-filter-driver.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-filter-driver.c,v
retrieving revision 1.73
diff -u -r1.73 camel-filter-driver.c
--- camel-filter-driver.c	30 May 2003 15:50:07 -0000	1.73
+++ camel-filter-driver.c	1 Dec 2003 15:55:31 -0000
@@ -695,7 +695,7 @@
 		if (maxfd > 0) {
 			for (fd = 0; fd < maxfd; fd++) {
 				if (fd != STDIN_FILENO && fd != STDOUT_FILENO && fd != STDERR_FILENO)
-					close (fd);
+					fcntl (fd, F_SETFD, FD_CLOEXEC);
 			}
 		}
 		
Index: camel-filter-search.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-filter-search.c,v
retrieving revision 1.31.6.1
diff -u -r1.31.6.1 camel-filter-search.c
--- camel-filter-search.c	11 Aug 2003 19:09:13 -0000	1.31.6.1
+++ camel-filter-search.c	1 Dec 2003 15:55:31 -0000
@@ -531,7 +531,7 @@
 		if (maxfd > 0) {
 			for (fd = 0; fd < maxfd; fd++) {
 				if (fd != STDIN_FILENO && fd != STDOUT_FILENO && fd != STDERR_FILENO)
-					close (fd);
+					fcntl (fd, F_SETFD, FD_CLOEXEC);
 			}
 		}
 		
Index: camel-gpg-context.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-gpg-context.c,v
retrieving revision 1.34.4.1
diff -u -r1.34.4.1 camel-gpg-context.c
--- camel-gpg-context.c	6 Nov 2003 16:23:07 -0000	1.34.4.1
+++ camel-gpg-context.c	1 Dec 2003 15:55:32 -0000
@@ -662,7 +662,7 @@
 				    (i != STDERR_FILENO) &&
 				    (i != fds[7]) &&  /* status fd */
 				    (i != fds[8]))    /* passwd fd */
-					close (i);
+					fcntl (i, F_SETFD, FD_CLOEXEC);
 			}
 		}
 		
Index: camel-process.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-process.c,v
retrieving revision 1.1
diff -u -r1.1 camel-process.c
--- camel-process.c	3 Mar 2003 22:53:15 -0000	1.1
+++ camel-process.c	1 Dec 2003 15:55:32 -0000
@@ -81,7 +81,7 @@
 		if ((maxfd = sysconf (_SC_OPEN_MAX)) > 0) {
 			for (i = 0; i < maxfd; i++) {
 				if (i != STDIN_FILENO && i != STDOUT_FILENO && i != STDERR_FILENO)
-					close (i);
+					fcntl (i, F_SETFD, FD_CLOEXEC);
 			}
 		}
 		


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]