diff options
author | наб <[email protected]> | 2021-03-26 14:41:38 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-04-02 16:30:08 -0700 |
commit | ca2ce9c50b6b579741de12867c9b7cbf4f799cb4 (patch) | |
tree | 5aa8f6de99cb7c7d33569cdc4660e883fa2b513a /cmd/zed/zed.c | |
parent | 3ef80eefff37d92315b030008edc853512d487da (diff) |
zed: use separate reaper thread and collect ZEDLETs asynchronously
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes #11807
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"); } /* |