This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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.
Attachment:
signature.asc
Description: OpenPGP digital signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |