From f41a28fe3ec5042849583081ca0e1aa6c38a7187 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 20 Sep 2020 18:45:59 +0200 Subject: Daemonize async process to automatically reap the child when it dies --- include/Program.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/Program.h b/include/Program.h index bc3e91e..cd45b30 100644 --- a/include/Program.h +++ b/include/Program.h @@ -30,7 +30,9 @@ bool wait_program_non_blocking(pid_t process_id, int *status); /* @args need to have at least 2 arguments. The first which is the program name - and the last which is NULL, which indicates end of args + and the last which is NULL, which indicates end of args. + @result_process_id should be set to NULL if you are not interested in the exit status of the child process + and you want the child process to be cleaned up automatically when it dies. */ int exec_program_async(const char **args, pid_t *result_process_id); #if 0 -- cgit v1.2.3