linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomas Szepe <szepe@pinerecords.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: "Richard B. Johnson" <root@chaos.analogic.com>,
	Linux kernel <linux-kernel@vger.kernel.org>,
	Andries.Brouwer@cwi.nl
Subject: Re: BUG (non-kernel), can hurt developers.
Date: Fri, 28 Nov 2003 08:18:12 +0100	[thread overview]
Message-ID: <20031128071812.GA28728@louise.pinerecords.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0311261021400.1524@home.osdl.org>

On Nov-26 2003, Wed, 10:29 -0800
Linus Torvalds <torvalds@osdl.org> wrote:

> You can't just randomly use library functions in signal handlers. You can
> only use a very specific "signal-safe" set.
> 
> POSIX lists that set in 3.3.1.3 (3f), and says
> 
> 	"All POSIX.1 functions not in the preceding table and all
> 	 functions defined in the C standard {2} not stated to be callable
> 	 from a signal-catching function are considered to be /unsafe/
> 	 with respect to signals. .."
> 
> typos mine.
> 
> The thing is, they have internal state that makes then non-reentrant (and
> note that even the re-entrant ones might not be signal-safe, since they
> may have deadlock issues: being thread-safe is _not_ the same as being
> signal-safe).

I believe it would be very useful to have this information included in
the standard Linux signal(2) manpage.  (I've just verified it's not in
man-pages-1.60.)

What do you think, Andries?

-- 
Tomas Szepe <szepe@pinerecords.com>

  parent reply	other threads:[~2003-11-28  7:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-26 16:54 BUG (non-kernel), can hurt developers Richard B. Johnson
2003-11-26 17:21 ` YOSHIFUJI Hideaki / 吉藤英明
2003-11-26 18:29 ` Linus Torvalds
2003-11-26 18:55   ` Richard B. Johnson
2003-11-26 19:33     ` Jamie Lokier
2003-11-26 20:17       ` Richard B. Johnson
2003-11-26 20:42         ` Jamie Lokier
2003-11-26 18:59   ` YOSHIFUJI Hideaki / 吉藤英明
2003-11-27 20:41   ` Mikulas Patocka
2003-11-28  7:18   ` Tomas Szepe [this message]
2003-11-28 10:29 Andries.Brouwer
2003-11-28 17:22 ` Chris Friesen
2003-11-28 21:21 Andries.Brouwer
2003-11-28 21:38 ` Chris Friesen

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=20031128071812.GA28728@louise.pinerecords.com \
    --to=szepe@pinerecords.com \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.com \
    --cc=torvalds@osdl.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 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 NNTP newsgroup(s).