[glib/wip/gsubprocess] GSubprocess: [rebase] Ensure we call g_spawn_close_pid() on Windows always



commit 930f3b3f356a2f5b89dbcfdd70782c4329f4fea1
Author: Colin Walters <walters verbum org>
Date:   Wed Jun 13 16:21:56 2012 -0400

    GSubprocess: [rebase] Ensure we call g_spawn_close_pid() on Windows always

 gio/gsubprocess.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gio/gsubprocess.c b/gio/gsubprocess.c
index d549037..48e429c 100644
--- a/gio/gsubprocess.c
+++ b/gio/gsubprocess.c
@@ -168,15 +168,15 @@ g_subprocess_finalize (GObject *object)
   GSubprocess *self = G_SUBPROCESS (object);
 
   if (self->state > G_SUBPROCESS_STATE_BUILDING &&
-      !self->detached &&
-      !self->reaped_child)
+      !self->detached)
     {
 #ifdef G_OS_UNIX
       /* Here we need to actually call waitpid() to clean up the
        * zombie.  In case the child hasn't actually exited, defer this
        * cleanup to the worker thread.
        */
-      g_subprocess_unix_queue_waitpid (self);
+      if (!self->reaped_child)
+	g_subprocess_unix_queue_waitpid (self);
 #endif
       g_spawn_close_pid (self->pid);
     }



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