aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorнаб <[email protected]>2021-03-26 22:21:00 +0100
committerTony Hutter <[email protected]>2021-06-23 13:22:15 -0700
commit073f3c78265fc8c36a154a5ec04acb985b20b599 (patch)
treea7b3a68abd57d6cddff3d9de7a4e9217710bc129
parent5072f37419e9665091cb10e6a0dc732b22151dca (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
-rw-r--r--cmd/zed/zed_exec.c1
-rw-r--r--man/man8/zed.8.in4
2 files changed, 3 insertions, 2 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);
}
}
diff --git a/man/man8/zed.8.in b/man/man8/zed.8.in
index 3d36c33ac..e32a89de8 100644
--- a/man/man8/zed.8.in
+++ b/man/man8/zed.8.in
@@ -234,8 +234,8 @@ Terminate the daemon.
Events are processed synchronously by a single thread. This can delay the
processing of simultaneous zevents.
.PP
-There is no maximum timeout for ZEDLET execution. Consequently, a misbehaving
-ZEDLET can delay the processing of subsequent zevents.
+ZEDLETs are killed after a maximum of ten seconds.
+This can lead to a violation of a ZEDLET's atomicity assumptions.
.PP
The ownership and permissions of the \fIenabled-zedlets\fR directory (along
with all parent directories) are not checked. If any of these directories