glib r7037 - in trunk: . glib
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r7037 - in trunk: . glib
- Date: Fri, 13 Jun 2008 14:11:03 +0000 (UTC)
Author: matthiasc
Date: Fri Jun 13 14:11:03 2008
New Revision: 7037
URL: http://svn.gnome.org/viewvc/glib?rev=7037&view=rev
Log:
* glib/gmain.c (g_main_context_init_pipe): Don't leak the
pipes to child processes. Patch by Thiago Macieira.
Modified:
trunk/ChangeLog
trunk/glib/gmain.c
Modified: trunk/glib/gmain.c
==============================================================================
--- trunk/glib/gmain.c (original)
+++ trunk/glib/gmain.c Fri Jun 13 14:11:03 2008
@@ -669,7 +669,10 @@
if (pipe (context->wake_up_pipe) < 0)
g_error ("Cannot create pipe main loop wake-up: %s\n",
g_strerror (errno));
-
+
+ fcntl (context->wake_up_pipe[0], F_SETFD, FD_CLOEXEC);
+ fcntl (context->wake_up_pipe[1], F_SETFD, FD_CLOEXEC);
+
context->wake_up_rec.fd = context->wake_up_pipe[0];
context->wake_up_rec.events = G_IO_IN;
# else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]