]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
Fix waitpid/wait3 return == 0 check
authorKurt Zeilenga <kurt@openldap.org>
Thu, 4 Jan 2001 00:17:03 +0000 (00:17 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 4 Jan 2001 00:17:03 +0000 (00:17 +0000)
servers/slapd/main.c

index 4b38c3f9b98f5934b3bb141a7d43f398ccff8559..28be1d10d16ab463aa271b7f365dd55026004427 100644 (file)
@@ -490,10 +490,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