aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zed
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-03-26 22:21:00 +0100
committerGitHub <[email protected]>2021-03-26 14:21:00 -0700
commit38280c3526845852c4da09fd0c11090493ee58fb (patch)
tree7acba772ee06dd3c0db02aee82721d33cab96866 /cmd/zed
parent2b56a634579e4cdab8d84ccba138e701a6d3bc64 (diff)
zed: reap child after killing on time-out
When a child process is killed waitpid() must be called on the pid the reap the zombie process. Update BUGS section to reflect reality by replacing "zedlets aren't time limited with "zedlets can be interrupted". Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #11769 Closes #11798
Diffstat (limited to 'cmd/zed')
-rw-r--r--cmd/zed/zed_exec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/zed/zed_exec.c b/cmd/zed/zed_exec.c
index aae607a9b..e8f510213 100644
--- a/cmd/zed/zed_exec.c
+++ b/cmd/zed/zed_exec.c
@@ -173,6 +173,7 @@ _zed_exec_fork_child(uint64_t eid, const char *dir, const char *prog,
zed_log_msg(LOG_WARNING, "Killing hung \"%s\" pid=%d",
prog, pid);
(void) kill(pid, SIGKILL);
+ (void) waitpid(pid, &status, 0);
}
}