From: Kurt Zeilenga Date: Tue, 21 Nov 2000 21:59:35 +0000 (+0000) Subject: ITS#900: Fix waitpid == 0 bug X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1646 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8befe70f3f2bd90337d66b13fdf8f1677a5e0bc9;p=openldap ITS#900: Fix waitpid == 0 bug --- diff --git a/servers/slapd/main.c b/servers/slapd/main.c index 6ec4fbd427..81f545eda9 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -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