unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Lukasz Majewski <lukma@denx.de>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH 1/2] misc: Set generic pselect as ENOSYS
Date: Fri, 15 Nov 2019 11:39:17 -0300	[thread overview]
Message-ID: <40f2d84f-dc14-43a1-64a9-f6738f02a568@linaro.org> (raw)
In-Reply-To: <20191114232039.32ddbfd2@jawa>


[-- Attachment #1.1: Type: text/plain, Size: 736 bytes --]



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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2019-11-15 14:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-14 18:50 [PATCH 1/2] misc: Set generic pselect as ENOSYS Adhemerval Zanella
2019-11-14 18:50 ` [PATCH 2/2] linux: Remove __ASSUME_PSELECT Adhemerval Zanella
2019-11-14 19:29   ` Florian Weimer
2019-11-14 19:28 ` [PATCH 1/2] misc: Set generic pselect as ENOSYS Florian Weimer
2019-11-14 20:01   ` Adhemerval Zanella
2019-11-14 20:08     ` Florian Weimer
2019-11-14 20:49 ` Joseph Myers
2019-11-14 22:00   ` Adhemerval Zanella
2019-11-14 22:00   ` [PATCH v2] " Adhemerval Zanella
2019-11-22 14:45     ` Adhemerval Zanella
2019-11-14 22:20 ` [PATCH 1/2] " Lukasz Majewski
2019-11-15 14:39   ` Adhemerval Zanella [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40f2d84f-dc14-43a1-64a9-f6738f02a568@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=lukma@denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).