From c28bba7a55866abcdab38422026dced7d6d4940d Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Sat, 26 Dec 2020 01:26:54 +0100 Subject: reaper: add optional callback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- spawn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spawn.c') 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"); -- cgit v1.3