From c8677065070ee34c05c7582a9c2f58d8642e552d Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 4 Jun 2021 18:39:48 +1000 Subject: 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. --- openbsd-compat/bsd-misc.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'openbsd-compat/bsd-misc.h') 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 -- cgit v1.2.3