]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blobdiff - src/lightdm.c
Re-enable SIGPIPE for children so they have default behaviour
[sojka/lightdm.git] / src / lightdm.c
index e64fc874d82ba4f1ab37beff43753044cf41501f..fd62314cfe406d44aa2a164e1ba0e974bd7a02f0 100644 (file)
@@ -1225,6 +1225,12 @@ main (int argc, char **argv)
     };
     GError *error = NULL;
 
+    /* Disable the SIGPIPE handler - this is a stupid Unix hangover behaviour.
+     * We will handle piples / sockets being closed instead of having the whole daemon be killed...
+     * http://stackoverflow.com/questions/8369506/why-does-sigpipe-exist
+     */
+    signal (SIGPIPE, SIG_IGN);
+
     /* When lightdm starts sessions it needs to run itself in a new mode */
     if (argc >= 2 && strcmp (argv[1], "--session-child") == 0)
         return session_child_run (argc, argv);