public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Ornati <ornati@fastwebnet.it>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Lack of Documentation about SA_RESTART...
Date: Mon, 25 Jul 2005 10:02:54 +0200	[thread overview]
Message-ID: <20050725100254.4b27279e@localhost> (raw)
In-Reply-To: <20050724145608.GA6132@thunk.org>

On Sun, 24 Jul 2005 10:56:08 -0400
Theodore Ts'o <tytso@mit.edu> wrote:

> The spect says "unless otherwise specified".  The description for
> pause() states that the process will sleep until receiving a signal
> that terminates the process or causes it to call signal-handling
> function.  That would presumably count as an "otherwise specified".

I don't think that way for at least 2 reasons:


1) SA_RESTART is an XSI extension, so every exception to the rule
"everything automatically restarted" should be under an XSI section
(like it is on the "select()" page).


2) The same thing that you claim for "pause()" (that isn't restarted)
can be claimed for other syscalls that _ARE_ restarted.

Example: wait()

SUSV3 DOC: "... The wait() function shall suspend execution of the
calling thread until status information for one of the terminated child
processes of the calling process is available, or until delivery of a
signal whose action is either to execute a signal-catching function or
to terminate the process ..."

And wait() is actually RESTARTED because:

	- it makes sense
	- FreeBSD sigaction() mapage says it is retarted

	- Linux does it (see kernel/exit.c)

	...
                retval = -ERESTARTSYS;
                if (signal_pending(current))
                        goto end;
	...


See?

-- 
	Paolo Ornati
	Linux 2.6.13-rc3 on x86_64

      reply	other threads:[~2005-07-25  8:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-11 10:32 Lack of Documentation about SA_RESTART Paolo Ornati
2005-07-11 14:34 ` Theodore Ts'o
2005-07-12  3:30   ` Philippe Troin
2005-07-12  8:43     ` Paolo Ornati
2005-07-12  8:38   ` Paolo Ornati
2005-07-12 10:10     ` Paolo Ornati
2005-07-12 12:04     ` Theodore Ts'o
2005-07-12 15:25       ` Paolo Ornati
2005-07-12 18:16         ` Theodore Ts'o
2005-07-13  7:45           ` Paolo Ornati
2005-07-24  0:30   ` Linus Torvalds
2005-07-24  7:28     ` Paolo Ornati
2005-07-24 14:56     ` Theodore Ts'o
2005-07-25  8:02       ` Paolo Ornati [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=20050725100254.4b27279e@localhost \
    --to=ornati@fastwebnet.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=tytso@mit.edu \
    /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