diff options
author | jlemon <jlemon@FreeBSD.org> | 2000-07-27 23:06:14 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2000-07-27 23:06:14 +0000 |
commit | a794883a9610947866791035df670560758d49d0 (patch) | |
tree | f397e61bd52776834e2261a4242779cc1b95d5ea /sys/kern/kern_event.c | |
parent | 45a5e1dea6f87aded318788862bc05a5c4d004a5 (diff) | |
download | FreeBSD-src-a794883a9610947866791035df670560758d49d0.zip FreeBSD-src-a794883a9610947866791035df670560758d49d0.tar.gz |
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?"
Diffstat (limited to 'sys/kern/kern_event.c')
-rw-r--r-- | sys/kern/kern_event.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 2f1a390..b40d510 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -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; } |