aboutsummaryrefslogtreecommitdiff
path: root/spawn.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-12-26 00:26:54 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-12-26 00:26:54 +0000
commit3c6789fb8ba87810a2aa83eebf6eea10c969db6d (patch)
tree72dddce6a55af8cc25ac7dfd016008ccd7d8eb94 /spawn.c
parentreadme: add builds.sr.ht status badge (diff)
reaper: add optional callback
When calling ‘reaper_add()’, the caller can provide a callback. If non-NULL, the reaper will call the callback to handle the actual reaping. If the callback is NULL, or if it returns false, the reaper reaps the child process.
Diffstat (limited to 'spawn.c')
-rw-r--r--spawn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/spawn.c b/spawn.c
index cc4755f4..6d96cf54 100644
--- a/spawn.c
+++ b/spawn.c
@@ -55,7 +55,7 @@ spawn(struct reaper *reaper, const char *cwd, char *const argv[],
close(pipe_fds[0]);
if (ret == 0) {
- reaper_add(reaper, pid);
+ reaper_add(reaper, pid, NULL, NULL);
return true;
} else if (ret < 0) {
LOG_ERRNO("failed to read from pipe");