mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-02 07:02:31 +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)
|
static void handle_SIGCHLD(int sig)
|
||||||
{
|
{
|
||||||
int status = 0;
|
int status = 0;
|
||||||
|
int pid = 0;
|
||||||
|
|
||||||
|
do {
|
||||||
|
pid = waitpid(-1, &status, WNOHANG);
|
||||||
|
} while (pid > 0);
|
||||||
|
|
||||||
wait(&status);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user