[mutter/+wip/wayland-2: 9/10] Fix weston-launch brokenness



commit 81d611803d84e8b922de0bd6db28f745b7a8df1c
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Tue Jul 16 16:00:09 2013 +0200

    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.

 src/core/main.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/core/main.c b/src/core/main.c
index 30e70fe..d545576 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]