Fixed process kill waitpid cleanup issues.

This commit is contained in:
ravinsp
2020-09-07 14:34:07 +05:30
parent 4ad8c59051
commit f121fa90fb
5 changed files with 19 additions and 9 deletions

View File

@@ -312,8 +312,9 @@ namespace comm
close(firewall_pipe[0]);
// Wait for some time and check if websocketd is still running properly.
// Sending signal 0 to test whether process exist.
util::sleep(20);
if (kill(pid, 0) == -1)
if (util::kill_process(pid, false, 0) == -1)
return -1;
websocketd_pid = pid;