[gnome-builder] supervisor: move ::spawned signal after we begin wait cb



commit 44792c5f40291767e168c5614ed518cbfdd16c8b
Author: Christian Hergert <chergert redhat com>
Date:   Fri Oct 28 15:27:34 2016 -0700

    supervisor: move ::spawned signal after we begin wait cb
    
    Ensure that our wait callback is queued before we let signal listeners
    access the subprocess.

 libide/subprocess/ide-subprocess-supervisor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libide/subprocess/ide-subprocess-supervisor.c b/libide/subprocess/ide-subprocess-supervisor.c
index a7e6cd0..2b218a3 100644
--- a/libide/subprocess/ide-subprocess-supervisor.c
+++ b/libide/subprocess/ide-subprocess-supervisor.c
@@ -371,11 +371,11 @@ ide_subprocess_supervisor_set_subprocess (IdeSubprocessSupervisor *self,
       if (subprocess != NULL)
         {
           g_get_current_time (&priv->last_spawn_time);
-          g_signal_emit (self, signals [SPAWNED], 0, subprocess);
           ide_subprocess_wait_async (priv->subprocess,
                                      NULL,
                                      ide_subprocess_supervisor_wait_cb,
                                      g_object_ref (self));
+          g_signal_emit (self, signals [SPAWNED], 0, subprocess);
         }
     }
 }


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