From b5f3238f6f4e4212f89e6ce23a49e062963a526e Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Fri, 9 Aug 2013 17:56:24 +0200 Subject: [PATCH] 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 727cdf1c1..9b3fd7145 100644 --- a/src/wayland/meta-wayland.c +++ b/src/wayland/meta-wayland.c @@ -32,6 +32,8 @@ #include #include #include +#include +#include #include diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c index fee0f036b..fb80a96ca 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 @@ -402,7 +398,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))