diff options
Diffstat (limited to 'cmd/zed/zed.c')
-rw-r--r-- | cmd/zed/zed.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/zed/zed.c b/cmd/zed/zed.c index 907b8af0d..349e4d01b 100644 --- a/cmd/zed/zed.c +++ b/cmd/zed/zed.c @@ -60,8 +60,8 @@ _setup_sig_handlers(void) zed_log_die("Failed to initialize sigset"); sa.sa_flags = SA_RESTART; - sa.sa_handler = SIG_IGN; + sa.sa_handler = SIG_IGN; if (sigaction(SIGPIPE, &sa, NULL) < 0) zed_log_die("Failed to ignore SIGPIPE"); @@ -75,6 +75,10 @@ _setup_sig_handlers(void) sa.sa_handler = _hup_handler; if (sigaction(SIGHUP, &sa, NULL) < 0) zed_log_die("Failed to register SIGHUP handler"); + + (void) sigaddset(&sa.sa_mask, SIGCHLD); + if (pthread_sigmask(SIG_BLOCK, &sa.sa_mask, NULL) < 0) + zed_log_die("Failed to block SIGCHLD"); } /* |