- /*}}}*/
-/*{{{*/
-// This implements a racy version of pselect for those architectures
-// that don't have a working implementation.
-// FIXME: Probably can be removed on Lenny+1
-static int racy_pselect(int nfds, fd_set *readfds, fd_set *writefds,
- fd_set *exceptfds, const struct timespec *timeout,
- const sigset_t *sigmask)
-{
- sigset_t origmask;
- struct timeval tv;
- int retval;
-
- tv.tv_sec = timeout->tv_sec;
- tv.tv_usec = timeout->tv_nsec/1000;
-
- sigprocmask(SIG_SETMASK, sigmask, &origmask);
- retval = select(nfds, readfds, writefds, exceptfds, &tv);
- sigprocmask(SIG_SETMASK, &origmask, 0);
- return retval;
-}
- /*}}}*/