summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/bsd-misc.h
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2021-06-04 10:39:48 +0200
committerDarren Tucker <dtucker@dtucker.net>2021-06-04 10:39:48 +0200
commitc8677065070ee34c05c7582a9c2f58d8642e552d (patch)
treee574f75ddc796ef0d7527ed6fcc634f66910991c /openbsd-compat/bsd-misc.h
parentauth_log: dont log partial successes as failures (diff)
downloadopenssh-c8677065070ee34c05c7582a9c2f58d8642e552d.tar.xz
openssh-c8677065070ee34c05c7582a9c2f58d8642e552d.zip
Add pselect implementation for platforms without.
This is basically the existing notify_pipe kludge from serverloop.c moved behind a pselect interface. It works by installing a signal handler that writes to a pipe that the select is watching, then calls the original handler. The select call in serverloop will become pselect soon, at which point the kludge will be removed from thereand will only exist in the compat layer. Original code by markus, help from djm.
Diffstat (limited to 'openbsd-compat/bsd-misc.h')
-rw-r--r--openbsd-compat/bsd-misc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index 3a7dd6f4c..def64238a 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -125,6 +125,11 @@ int isblank(int);
pid_t getpgid(pid_t);
#endif
+#ifndef HAVE_PSELECT
+int pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *,
+ const sigset_t *);
+#endif
+
#ifndef HAVE_ENDGRENT
# define endgrent() do { } while(0)
#endif