Have kevent() automatically restart if interrupted by a signal. If this
is not desired, then the user can register an EV_SIGNAL filter to explicitly catch a signal event. Change requested by: jayanth, ps, peter "Why is kevent non-restartable after a signal?"
This commit is contained in:
parent
45a5e1dea6
commit
a794883a96
@ -557,12 +557,9 @@ start:
|
||||
kq->kq_state |= KQ_SLEEP;
|
||||
error = tsleep(kq, PSOCK | PCATCH, "kqread", timeout);
|
||||
splx(s);
|
||||
if (error == 0)
|
||||
if (error == 0 || error == ERESTART)
|
||||
goto retry;
|
||||
/* don't restart after signals... */
|
||||
if (error == ERESTART)
|
||||
error = EINTR;
|
||||
else if (error == EWOULDBLOCK)
|
||||
if (error == EWOULDBLOCK)
|
||||
error = 0;
|
||||
goto done;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user