mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#900: Fix waitpid == 0 bug
This commit is contained in:
parent
5941625eb7
commit
8befe70f3f
@ -494,10 +494,10 @@ wait4child( int sig )
|
||||
#ifdef WNOHANG
|
||||
errno = 0;
|
||||
#ifdef HAVE_WAITPID
|
||||
while ( waitpid( (pid_t)-1, NULL, WNOHANG ) >= 0 || errno == EINTR )
|
||||
while ( waitpid( (pid_t)-1, NULL, WNOHANG ) > 0 || errno == EINTR )
|
||||
; /* NULL */
|
||||
#else
|
||||
while ( wait3( NULL, WNOHANG, NULL ) >= 0 || errno == EINTR )
|
||||
while ( wait3( NULL, WNOHANG, NULL ) > 0 || errno == EINTR )
|
||||
; /* NULL */
|
||||
#endif
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user