Make waitpid(2) fail on signal arrival.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-09-09 22:57:42 +02:00
parent da7f10269d
commit 66487f2895
1 changed files with 2 additions and 1 deletions

View File

@ -357,8 +357,9 @@ namespace Sortix
if ( options & WNOHANG ) if ( options & WNOHANG )
return 0; return 0;
zombiewaiting++; zombiewaiting++;
kthread_cond_wait(&zombiecond, &childlock); unsigned long r = kthread_cond_wait_signal(&zombiecond, &childlock);
zombiewaiting--; zombiewaiting--;
if ( !r ) { Error::Set(EINTR); return -1; }
} }
if ( zombie->prevsibling ) if ( zombie->prevsibling )