Skip to content

Commit 1cef414

Browse files
committed
document why EV_OOBAND doesn't work for userland the way it's documented in the header
1 parent 49290e1 commit 1cef414

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

util/tcp-urgent.c

+8
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,14 @@ static short keventpending(int fd, short events) {
265265
#if defined EV_OOBAND
266266
if (events & (POLLIN|POLLRDNORM|POLLRDBAND|POLLPRI)) {
267267
int flags = EV_ADD|EV_ONESHOT;
268+
/*
269+
* NB: This is pointless as the xnu kernel discards
270+
* EV_OOBAND by doing
271+
*
272+
* kev.flags &= ~EV_SYSFLAGS
273+
*
274+
* during changelist processing in bsd/kern/kern_event.c.
275+
*/
268276
if (events & (POLLRDBAND|POLLPRI))
269277
flags |= EV_OOBAND;
270278
EV_SET(ep, fd, EVFILT_READ, flags, 0, 0, 0);

0 commit comments

Comments
 (0)