Handle EINTR from sem_wait()