aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-config.c9
2 files changed, 10 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index be75dee5d6..b1a592ce5f 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2003-12-01 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-config.c (mail_config_signature_run_script): 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-12-01 Rodney Dawes <dobey@ximian.com>
* GNOME_Evlution_Mail.server.in.in:
diff --git a/mail/mail-config.c b/mail/mail-config.c
index dfb9be8f1f..4e64adbe06 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -1430,14 +1430,11 @@ mail_config_signature_run_script (gchar *script)
setsid ();
maxfd = sysconf (_SC_OPEN_MAX);
- if (maxfd > 0) {
- for (i = 0; i < maxfd; i++) {
- if (i != STDIN_FILENO && i != STDOUT_FILENO && i != STDERR_FILENO)
- close (i);
- }
+ for (i = 3; i < maxfd; i++) {
+ if (i != STDIN_FILENO && i != STDOUT_FILENO && i != STDERR_FILENO)
+ fcntl (i, F_SETFD, FD_CLOEXEC);
}
-
execlp (script, script, NULL);
g_warning ("Could not execute %s: %s\n", script, g_strerror (errno));
_exit (255);