summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiovanni Campagna <gcampagn@redhat.com>2013-07-16 16:00:09 +0200
committerGiovanni Campagna <gcampagn@redhat.com>2013-07-17 15:14:48 +0200
commit4612736620f25b9c8cd802ef1190f09bd9edd565 (patch)
treeab60e1b63dc9d6367195dd005507f2ad6d20e77e
parent4dca0718450d48d8f5e4b0494d82128132917b91 (diff)
downloadmutter-4612736620f25b9c8cd802ef1190f09bd9edd565.tar.gz
Fix weston-launch brokenness
Apparently sigprocmask is inherited across fork and execve, so when started by weston-launch we get the broken mask with INT, TERM and CHLD blocked. In particular, mutter was not noticing that xwayland was crashing.
-rw-r--r--src/core/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 30e70fe14..d54557674 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -390,7 +390,15 @@ meta_init (void)
g_strerror (errno));
#endif
+ /* Revert weston-launch brokenness */
+ sigemptyset (&empty_mask);
+ sigaddset (&empty_mask, SIGTERM);
+ sigaddset (&empty_mask, SIGCHLD);
+ sigaddset (&empty_mask, SIGINT);
+ sigprocmask (SIG_UNBLOCK, &empty_mask, NULL);
+
g_unix_signal_add (SIGTERM, on_sigterm, NULL);
+ g_unix_signal_add (SIGINT, on_sigterm, NULL);
if (g_getenv ("MUTTER_VERBOSE"))
meta_set_verbose (TRUE);