[gnome-builder] subprocess: also use setpgid() after setsid()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] subprocess: also use setpgid() after setsid()
- Date: Sat, 12 Nov 2016 10:14:37 +0000 (UTC)
commit 97ed7156c487d51cbcae8e187f1ba41747bd21ec
Author: Christian Hergert <chergert redhat com>
Date: Sat Nov 12 02:11:36 2016 -0800
subprocess: also use setpgid() after setsid()
It's not clear to me that this is strictly required (at least it doesn't
seem to be on Linux). But I see it in various other places so it might be
useful on other platforms where setsid() does not also imply joining the
process group.
libide/subprocess/ide-subprocess-launcher.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/libide/subprocess/ide-subprocess-launcher.c b/libide/subprocess/ide-subprocess-launcher.c
index 31a8798..c736648 100644
--- a/libide/subprocess/ide-subprocess-launcher.c
+++ b/libide/subprocess/ide-subprocess-launcher.c
@@ -77,6 +77,7 @@ child_setup_func (gpointer data)
* as expected.
*/
setsid ();
+ setpgid (0, 0);
if (isatty (priv->stdin_fd))
ioctl (priv->stdin_fd, TIOCSCTTY, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]