darwin: handle KERN_ABORTED in uv_sem_wait()

This commit is contained in:
Fedor Indutny 2012-08-22 19:27:17 +07:00 committed by Ben Noordhuis
parent 29eb460d0b
commit 8969df6015

View File

@ -187,7 +187,13 @@ void uv_sem_post(uv_sem_t* sem) {
void uv_sem_wait(uv_sem_t* sem) {
if (semaphore_wait(*sem))
int r;
do
r = semaphore_wait(*sem);
while (r == KERN_ABORTED);
if (r != KERN_SUCCESS)
abort();
}