[PATCH 1/2] misc: Set generic pselect as ENOSYS
Lukasz Majewski
lukma@denx.de
Thu Nov 14 22:20:00 GMT 2019
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.
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20191114/4a4c02de/attachment.sig>
More information about the Libc-alpha
mailing list