All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maciek Borzecki <maciek.borzecki@gmail.com>
To: Ulrich Drepper <drepper@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: pselect semantics - no EINTR with pending signals
Date: Mon, 12 Sep 2011 10:47:13 +0200	[thread overview]
Message-ID: <CALGyLagJ1pL=4PBPTp-uzwAnTB_hrZuqW93xUd=45dOKpb3-GA@mail.gmail.com> (raw)
In-Reply-To: <CAOPLpQdU8k2e2TN4mj+T9cPJnVTP_Js9q7YH6iqq1Z0_5NM4kQ@mail.gmail.com>

On Sun, Sep 11, 2011 at 4:45 PM, Ulrich Drepper <drepper@gmail.com> wrote:
> On Fri, Sep 9, 2011 at 09:25, Maciek Borzecki <maciek.borzecki@gmail.com> wrote:
>> Now, I'm not sure about the semantics of pselect. I'm not saying that
>> the current version is right or wrong, but raising a question if this
>> is really expected (and it did happen to be quite unexpected for me).
>
> The standard says
>
>       If  sigmask  is not a null pointer, then the pselect() function
> shall replace the signal mask of the
>       process by the set of signals pointed to by sigmask before
> examining  the  descriptors,  and  shall
>       restore the signal mask of the process before returning.
>
> The way I read this the kernel does have to give the signal a chance
> to be delivered even if there are file descriptor ready for I/O.
I do agree, otherwise the signal delivery gating functionality of
pselect is not really useful.

I'd submit a patch, provided that current behavior is considered
incorrect. Hopefully userspace would not be affected to the degree
that things would get broken.

--
Maciek Borzecki

      reply	other threads:[~2011-09-12  8:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09 13:25 pselect semantics - no EINTR with pending signals Maciek Borzecki
2011-09-11 14:45 ` Ulrich Drepper
2011-09-12  8:47   ` Maciek Borzecki [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

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

  git send-email \
    --in-reply-to='CALGyLagJ1pL=4PBPTp-uzwAnTB_hrZuqW93xUd=45dOKpb3-GA@mail.gmail.com' \
    --to=maciek.borzecki@gmail.com \
    --cc=drepper@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.