> A better place to look would be the C standard, a draft of the latest
version being freely available if you search for n1124.pdf.
http://www.open-std.org/jtc1/sc22/wg...1997/N1124.pdf
This document (ISO/IEC 9899:TC2 Committee Draft - May 6, 2005
WG14/N1124) contains the following wording.
Page 20, section "5.2.3 Signals and interrupts":
"...
Functions shall be implemented such that they may be interrupted at any
time by a signal, or may be called by a signal handler, or both, with
no alteration to earlier, but still active, invocations' control flow
(after the interruption), function return values, or objects with
automatic storage duration.
...."
Page 167, section "7.1.4 Use of library functions":
"...
The functions in the standard library are not guaranteed to be
reentrant and may modify objects with static storage duration.
....
161) Thus, a signal handler cannot, in general, call standard library
functions.
...."
There are more descriptions about signal handling in the sections 7.14
and 7.26.6. But the term "async-signal-safe function" is not used in
the specification. I suggest to look at other information sources for
better understanding of the topic "async-signal safety".
- Multithreaded Programming Guide
http://docs.sun.com/app/docs/doc/816...w#compat-ix626 http://docs.sun.com/app/docs/doc/816...view#gen-ix561
-
http://serpentine.com/blog/threads-faq/signals.html
-
http://en.wikipedia.org/wiki/Reentrant http://en.wikipedia.org/wiki/SIGSEGV
Regards,
Markus