summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-pselect.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/bsd-pselect.c')
-rw-r--r--openbsd-compat/bsd-pselect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd-compat/bsd-pselect.c b/openbsd-compat/bsd-pselect.c
index fff1bf54..b3632086 100644
--- a/openbsd-compat/bsd-pselect.c
+++ b/openbsd-compat/bsd-pselect.c
@@ -188,7 +188,7 @@ pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
if (unmasked) {
pselect_notify_setup();
pselect_notify_prepare(readfds);
- nfds = MAX(nfds, notify_pipe[0]);
+ nfds = MAX(nfds, notify_pipe[0] + 1);
}
/* Unmask signals, call select then restore signal mask. */