Skip to content
Snippets Groups Projects
Commit 8befe70f authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

ITS#900: Fix waitpid == 0 bug

parent 5941625e
Branches
Tags
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment