mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-20 02:04:54 +00:00
[core] Add loop with waitpid to avoid zombies process
This commit is contained in:
parent
7f0edeafcc
commit
be73c096d0
@ -41,8 +41,12 @@
|
||||
static void handle_SIGCHLD(int sig)
|
||||
{
|
||||
int status = 0;
|
||||
int pid = 0;
|
||||
|
||||
do {
|
||||
pid = waitpid(-1, &status, WNOHANG);
|
||||
} while (pid > 0);
|
||||
|
||||
wait(&status);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user