lkml.org 
[lkml]   [2003]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BUG (non-kernel), can hurt developers.
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>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [from the cache]
©2003-2011 Jasper Spaans