fix kqueue behaviour; requires special kernel patch to make kqueue

semantics consistent; from marius@umich.edu


svn:r92
This commit is contained in:
Niels Provos 2003-12-20 20:05:17 +00:00
parent 8a92823c67
commit 1b974101b9

View File

@ -290,6 +290,10 @@ kq_add(void *arg, struct event *ev)
memset(&kev, 0, sizeof(kev));
kev.ident = ev->ev_fd;
kev.filter = EVFILT_READ;
#ifdef NOTE_EOF
/* Make it behave like select() and poll() */
kev.fflags = NOTE_EOF;
#endif
kev.flags = EV_ADD;
if (!(ev->ev_events & EV_PERSIST))
kev.flags |= EV_ONESHOT;