summaryrefslogtreecommitdiff
path: root/mach-defpager
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-11-01 16:29:31 +0100
committerJustus Winter <justus@gnupg.org>2016-11-06 17:15:25 +0100
commit345abeda66c8aa5cb4d121fc8455cbe8053b9db6 (patch)
treea7469fcede599f679b7e6ef5eb1642b1e4c8c49a /mach-defpager
parent8cf212d402b0a392ed6c89f9e1035cbbf9988478 (diff)
mach-defpager: Fix daemonization.HEADmaster
* mach-defpager/main.c (main): Do not hang if the child dies.
Diffstat (limited to 'mach-defpager')
-rw-r--r--mach-defpager/main.c4
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: