[gnome-builder] subprocess-supervisor: fix spawned signal



commit b94ac79c2c4053bffe78d4188cbaaed8e4cfa550
Author: Christian Hergert <chergert redhat com>
Date:   Sun Oct 23 20:09:15 2016 -0700

    subprocess-supervisor: fix spawned signal
    
    This had the incorrect type for ::spawned.

 libide/subprocess/ide-subprocess-supervisor.c |   20 +++++++++++++-------
 libide/subprocess/ide-subprocess-supervisor.h |    4 ++++
 2 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/libide/subprocess/ide-subprocess-supervisor.c b/libide/subprocess/ide-subprocess-supervisor.c
index a4f3f40..71aef83 100644
--- a/libide/subprocess/ide-subprocess-supervisor.c
+++ b/libide/subprocess/ide-subprocess-supervisor.c
@@ -18,8 +18,10 @@
 
 #define G_LOG_DOMAIN "ide-subproces-supervisor"
 
-#include "ide-subprocess.h"
-#include "ide-subprocess-supervisor.h"
+#include "ide-debug.h"
+
+#include "subprocess/ide-subprocess.h"
+#include "subprocess/ide-subprocess-supervisor.h"
 
 typedef struct
 {
@@ -112,11 +114,12 @@ ide_subprocess_supervisor_class_init (IdeSubprocessSupervisorClass *klass)
   object_class->finalize = ide_subprocess_supervisor_finalize;
 
   signals [SPAWNED] =
-    g_signal_new_class_handler ("spawned",
-                                G_TYPE_FROM_CLASS (klass),
-                                G_SIGNAL_RUN_LAST,
-                                NULL, NULL, NULL, NULL,
-                                G_TYPE_NONE, 1, G_TYPE_SUBPROCESS);
+    g_signal_new ("spawned",
+                  G_TYPE_FROM_CLASS (klass),
+                  G_SIGNAL_RUN_LAST,
+                  G_STRUCT_OFFSET (IdeSubprocessSupervisorClass, spawned),
+                  NULL, NULL, NULL,
+                  G_TYPE_NONE, 1, IDE_TYPE_SUBPROCESS);
 
   signals [SUPERVISE] =
     g_signal_new_class_handler ("supervise",
@@ -249,6 +252,9 @@ ide_subprocess_supervisor_wait_cb (GObject      *object,
   if (!ide_subprocess_wait_finish (subprocess, result, &error))
     g_warning ("%s", error->message);
 
+  IDE_TRACE_MSG ("process exited with code: %u",
+                 ide_subprocess_get_exit_status (subprocess));
+
   if (priv->subprocess == subprocess)
     {
       g_clear_object (&priv->subprocess);
diff --git a/libide/subprocess/ide-subprocess-supervisor.h b/libide/subprocess/ide-subprocess-supervisor.h
index 0839d3e..c5f7ae1 100644
--- a/libide/subprocess/ide-subprocess-supervisor.h
+++ b/libide/subprocess/ide-subprocess-supervisor.h
@@ -19,6 +19,7 @@
 #ifndef IDE_SUBPROCESS_SUPERVISOR_H
 #define IDE_SUBPROCESS_SUPERVISOR_H
 
+#include "subprocess/ide-subprocess.h"
 #include "subprocess/ide-subprocess-launcher.h"
 
 G_BEGIN_DECLS
@@ -31,6 +32,9 @@ struct _IdeSubprocessSupervisorClass
 {
   GObjectClass parent_class;
 
+  void (*spawned) (IdeSubprocessSupervisor *self,
+                   IdeSubprocess           *subprocess);
+
   gpointer _reserved1;
   gpointer _reserved2;
   gpointer _reserved3;


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