[gnome-builder/wip/chergert/multi-process: 39/58] app: kill worker process with parent
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/multi-process: 39/58] app: kill worker process with parent
- Date: Thu, 29 Oct 2015 00:37:36 +0000 (UTC)
commit c1a1500cefbdbac6d2cec26d14f077bfc23c95f2
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 20 00:15:28 2015 -0700
app: kill worker process with parent
src/app/gb-application.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/app/gb-application.c b/src/app/gb-application.c
index 7f5256d..4ac74be 100644
--- a/src/app/gb-application.c
+++ b/src/app/gb-application.c
@@ -22,6 +22,10 @@
# include "config.h"
#endif
+#ifdef __linux
+# include <sys/prctl.h>
+#endif
+
#include <glib/gi18n.h>
#include <gtksourceview/gtksource.h>
@@ -63,6 +67,11 @@ gb_application_load_worker (GbApplication *self)
g_assert (GB_IS_APPLICATION (self));
g_assert (gb_application_is_worker (self));
+#ifdef __linux
+ /* Ensure we are killed with our parent */
+ prctl (PR_SET_PDEATHSIG, 15);
+#endif
+
connection = g_dbus_connection_new_for_address_sync (self->dbus_address,
G_DBUS_CONNECTION_FLAGS_NONE,
NULL, NULL, &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]