Supervisor reaps all children, not just one, before starting new child.
git-svn-id: http://yate.null.ro/svn/yate/trunk@1424 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
b9dd361c2c
commit
657da65c74
|
@ -386,7 +386,8 @@ static int supervise(void)
|
|||
::fcntl(logfd[0],F_SETFL,O_NONBLOCK);
|
||||
}
|
||||
// reap any children we may have before spawning a new one
|
||||
::waitpid(-1,0,WNOHANG);
|
||||
while (::waitpid(-1,0,WNOHANG) > 0)
|
||||
;
|
||||
s_childpid = ::fork();
|
||||
if (s_childpid < 0) {
|
||||
int err = errno;
|
||||
|
|
Loading…
Reference in New Issue