waitpid(): Fixed regression introduced with my signals changes: When WNOHANG was
specified the syscall error code B_WOULD_BLOCK would no longer be mapped to 0. Fixes #7693. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42188 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5b0ecc5fd1
commit
100541ec40
@ -32,8 +32,13 @@ waitpid(pid_t pid, int* _status, int options)
|
||||
|
||||
pthread_testcancel();
|
||||
|
||||
if (child < 0)
|
||||
if (child < 0) {
|
||||
// When not getting a child status when WNOHANG was specified, don't
|
||||
// fail.
|
||||
if (child == B_WOULD_BLOCK && (options & WNOHANG) != 0)
|
||||
return 0;
|
||||
RETURN_AND_SET_ERRNO(child);
|
||||
}
|
||||
|
||||
// prepare the status
|
||||
if (_status != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user