[gnome-builder] subprocess: remove use of prctl() to set parent death signal
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] subprocess: remove use of prctl() to set parent death signal
- Date: Mon, 31 Oct 2016 10:22:38 +0000 (UTC)
commit 3b8a7c3d9c2e66b97fc743ce19da9ab5238cb797
Author: Christian Hergert <chergert redhat com>
Date: Mon Oct 31 03:21:19 2016 -0700
subprocess: remove use of prctl() to set parent death signal
This cannot be used here because we will be run from a worker thread.
What this means (according to `man prtcl`) is that when the thread that
executes this subprocess (fork, execve) dies, the parent death signal will
be sent. This is not what we want as we want it only to be sent once the
entire process dies.
This can be done with prctl(), but requires that it is done from the main
thread if we want to ensure that it works as we would expect it.
libide/subprocess/ide-subprocess-launcher.c | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
---
diff --git a/libide/subprocess/ide-subprocess-launcher.c b/libide/subprocess/ide-subprocess-launcher.c
index 2b6990b..d1c874e 100644
--- a/libide/subprocess/ide-subprocess-launcher.c
+++ b/libide/subprocess/ide-subprocess-launcher.c
@@ -23,10 +23,6 @@
#include <string.h>
#include <unistd.h>
-#ifdef __linux
-# include <sys/prctl.h>
-#endif
-
#include "ide-debug.h"
#include "ide-macros.h"
@@ -79,11 +75,6 @@ child_setup_func (gpointer data)
*/
setsid ();
#endif
-
-#ifdef __linux
- /* Ensure we are killed with our parent */
- prctl (PR_SET_PDEATHSIG, SIGKILL);
-#endif
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]