change to avoid zombies

This commit is contained in:
prx 2023-05-12 12:10:38 +02:00
parent 0265627230
commit ba85c1dc9b
1 changed files with 1 additions and 1 deletions

2
main.c
View File

@ -46,7 +46,7 @@ static void runcmd(const char* cmd, const char** arg_list)
syslog(LOG_DAEMON, "execv error");
err(1,"execv");
} else { /* parent */
waitpid(pid, NULL, WNOHANG);
waitpid(pid, NULL, 0);
}
}