public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ulrich Drepper <drepper@gmail.com>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: Dave Airlie <airlied@gmail.com>,
	Roland McGrath <roland@redhat.com>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: Fw: sigwait() breaks when straced
Date: Mon, 1 Aug 2005 12:20:07 -0700	[thread overview]
Message-ID: <a36005b505080112203c7a5b58@mail.gmail.com> (raw)
In-Reply-To: <9a87484905080109257abd0bde@mail.gmail.com>

On 8/1/05, Jesper Juhl <jesper.juhl@gmail.com> wrote:
> I'm not quite sure you are right Ulrich. Given this little bit from
> SUSv3 about SA_RESTART in the page describing sigaction (
> http://www.opengroup.org/onlinepubs/009695399/functions/sigaction.html
> ) :

It's not an official SA_RESTART since the syscall is defined to
support EINTR.  It's clear  that sigwait in this sense is not
interruptible.  Return EINTR from sigwait is only allowed by POSIX
since there is no contrary wording (unlike for the pthread functions).
 But if this clause would be used each and every syscall could return
EINTR and we would have to surround all syscalls with a loop.  Hence
the syscall should be restarted, not because SA_RESTART is set, but
because EINTR shouldn't be returned.

Now, Roland correctly said sigtimedwait and sigwaitinfo need to return
EINTR and we use one syscall for them all.  I overlook that part.  So,
I'll add the wrapper in the libc so that sigwait restarts on EINTR.

  reply	other threads:[~2005-08-01 19:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050730170049.6df9e39f.akpm@osdl.org>
2005-08-01  0:01 ` Fw: sigwait() breaks when straced Roland McGrath
2005-08-01  0:12   ` Dave Airlie
2005-08-01 16:25     ` Jesper Juhl
2005-08-01 19:20       ` Ulrich Drepper [this message]
2005-08-01  7:09   ` Ulrich Drepper
2005-08-01  7:57     ` Roland McGrath

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=a36005b505080112203c7a5b58@mail.gmail.com \
    --to=drepper@gmail.com \
    --cc=airlied@gmail.com \
    --cc=akpm@osdl.org \
    --cc=jesper.juhl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.com \
    /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