On 14/11/2019 19:20, Lukasz Majewski wrote: > Dear Adhemerval, > >> +__pselect (int nfds, fd_set *readfds, fd_set *writefds, fd_set >> *exceptfds, >> + const struct timespec *timeout, const sigset_t *sigmask) >> +{ >> + int ret = __pselect_syscall (nfds, readfds, writefds, exceptfds, >> timeout, >> + sigmask); >> + if (ret < 0 && errno != ENOSYS) >> + return ret; > > Is the above condition correct? > > The pselect returns -1 on error or >= 0 on success. > > Shouldn't it be instead: > > if (! (ret == -1 && errno == ENOSYS)) > > Only when pselect is not supported we shall fallback to select based > implementation. Indeed, we need to take care of ret being 0. Fixed locally.