Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Bug 538119 – glib's mainloop leaks a pipe to sub-processes
Browse files Browse the repository at this point in the history
        * glib/gmain.c (g_main_context_init_pipe): Don't leak the
        pipes to child processes. Patch by Thiago Macieira.


svn path=/branches/glib-2-16/; revision=7116
  • Loading branch information
Matthias Clasen committed Jun 30, 2008
1 parent 695a864 commit faf349a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
@@ -1,3 +1,12 @@
2008-06-30 Matthias Clasen <mclasen@redhat.com>

Backport from trunk:

Bug 538119 – glib's mainloop leaks a pipe to sub-processes

* glib/gmain.c (g_main_context_init_pipe): Don't leak the
pipes to child processes. Patch by Thiago Macieira.

2008-06-30 Matthias Clasen <mclasen@redhat.com>

Backport from trunk:
Expand Down
3 changes: 3 additions & 0 deletions glib/gmain.c
Expand Up @@ -629,6 +629,9 @@ g_main_context_init_pipe (GMainContext *context)
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
Expand Down

0 comments on commit faf349a

Please sign in to comment.