diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2016-12-09 11:17:40 +1300 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2016-12-09 11:17:40 +1300 |
commit | e04380750a410a8ce1ba50b94e762d75dc29fd18 (patch) | |
tree | e3dad5c64fac841d7fb5adef92cb018e1cb629bb | |
parent | 3a73386b4f50bd87ac5613f55a3ec908f1905339 (diff) | |
download | lightdm-git-e04380750a410a8ce1ba50b94e762d75dc29fd18.tar.gz |
Use SA_RESTART on signals so we don't get interrupted reads
-rw-r--r-- | src/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c index 75357db6..6f07e4e5 100644 --- a/src/process.c +++ b/src/process.c @@ -458,7 +458,7 @@ process_class_init (ProcessClass *klass) g_io_add_watch (g_io_channel_unix_new (signal_pipe[0]), G_IO_IN, handle_signal, NULL); action.sa_sigaction = signal_cb; sigemptyset (&action.sa_mask); - action.sa_flags = SA_SIGINFO; + action.sa_flags = SA_SIGINFO | SA_RESTART; sigaction (SIGTERM, &action, NULL); sigaction (SIGINT, &action, NULL); sigaction (SIGHUP, &action, NULL); |