diff options
-rw-r--r-- | src/lightdm.c | 7 | ||||
-rw-r--r-- | src/process.c | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/lightdm.c b/src/lightdm.c index 491b01a4..4b298bcf 100644 --- a/src/lightdm.c +++ b/src/lightdm.c @@ -597,6 +597,7 @@ login1_service_seat_removed_cb (Login1Service *service, Login1Seat *login1_seat) int main (int argc, char **argv) { + struct sigaction action; FILE *pid_file; GOptionContext *option_context; gboolean result; @@ -648,7 +649,11 @@ main (int argc, char **argv) * 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); + action.sa_handler = SIG_IGN; + sigemptyset (&action.sa_mask); + action.sa_flags = SA_RESTART; + sigaction (SIGPIPE, &action, NULL); + sigaction (SIGHUP, &action, NULL); /* When lightdm starts sessions it needs to run itself in a new mode */ if (argc >= 2 && strcmp (argv[1], "--session-child") == 0) diff --git a/src/process.c b/src/process.c index 6f07e4e5..4815e460 100644 --- a/src/process.c +++ b/src/process.c @@ -461,7 +461,6 @@ process_class_init (ProcessClass *klass) action.sa_flags = SA_SIGINFO | SA_RESTART; sigaction (SIGTERM, &action, NULL); sigaction (SIGINT, &action, NULL); - sigaction (SIGHUP, &action, NULL); sigaction (SIGUSR1, &action, NULL); sigaction (SIGUSR2, &action, NULL); } |