diff options
author | Justus Winter <justus@gnupg.org> | 2016-11-01 16:29:31 +0100 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-11-06 17:15:25 +0100 |
commit | 345abeda66c8aa5cb4d121fc8455cbe8053b9db6 (patch) | |
tree | a7469fcede599f679b7e6ef5eb1642b1e4c8c49a /mach-defpager | |
parent | 8cf212d402b0a392ed6c89f9e1035cbbf9988478 (diff) |
* mach-defpager/main.c (main): Do not hang if the child dies.
Diffstat (limited to 'mach-defpager')
-rw-r--r-- | mach-defpager/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mach-defpager/main.c b/mach-defpager/main.c index e33c2b33..71615c8f 100644 --- a/mach-defpager/main.c +++ b/mach-defpager/main.c @@ -104,9 +104,11 @@ main (int argc, char **argv) exitting, and the child sends that signal after it is set up. */ sigset_t set; signal (SIGUSR1, nohandler); + signal (SIGCHLD, nohandler); sigemptyset (&set); sigaddset (&set, SIGUSR1); - sigprocmask (SIG_BLOCK, &set, 0); + sigaddset (&set, SIGCHLD); + sigprocmask (SIG_SETMASK, &set, NULL); switch (fork ()) { case -1: |