[mutter/wip/wayland-work: 9/11] Stop messing with process groups
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/wayland-work: 9/11] Stop messing with process groups
- Date: Tue, 3 Sep 2013 15:16:13 +0000 (UTC)
commit 30633dcb33d7245fef9ab81ddbb368f53bdfead5
Author: Giovanni Campagna <gcampagn redhat com>
Date: Fri Aug 9 17:56:24 2013 +0200
Stop messing with process groups
We can be launched by gnome-session now, which implies gdb must be
attached from outside, and the Ctrl-C problem is gone.
https://bugzilla.gnome.org/show_bug.cgi?id=706421
src/wayland/meta-wayland.c | 2 ++
src/wayland/meta-xwayland.c | 8 ++------
2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index 5c59cec..5fa61fa 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -32,6 +32,8 @@
#include <sys/stat.h>
#include <stdlib.h>
#include <sys/wait.h>
+#include <fcntl.h>
+#include <unistd.h>
#include <wayland-server.h>
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index 3b3c699..49cc51d 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -269,7 +269,7 @@ bind_to_unix_socket (int display)
}
static void
-uncloexec_and_setpgid (gpointer user_data)
+uncloexec (gpointer user_data)
{
int fd = GPOINTER_TO_INT (user_data);
@@ -278,10 +278,6 @@ uncloexec_and_setpgid (gpointer user_data)
int flags = fcntl (fd, F_GETFD);
if (flags != -1)
fcntl (fd, F_SETFD, flags & ~FD_CLOEXEC);
-
- /* Put this process in a background process group, so that Ctrl-C
- goes to mutter only */
- setpgid (0, 0);
}
static void
@@ -401,7 +397,7 @@ meta_xwayland_start (MetaWaylandCompositor *compositor)
G_SPAWN_DO_NOT_REAP_CHILD |
G_SPAWN_STDOUT_TO_DEV_NULL |
G_SPAWN_STDERR_TO_DEV_NULL,
- uncloexec_and_setpgid,
+ uncloexec,
GINT_TO_POINTER (sp[1]),
&pid,
&error))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]