diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-02-16 15:33:24 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-02-16 15:48:36 +0100 |
| commit | 082efcce8be74b6b6f30e4b9a33d35ef68b9772c (patch) | |
| tree | 0dd1ad8844b9d6b72ce283a90302562335299ca3 | |
| parent | f1d6ee621182f84ba729faad1f71fae1a606ee96 (diff) | |
| download | man-pages-082efcce8be74b6b6f30e4b9a33d35ef68b9772c.tar.gz | |
signal.7: Note the interactions of longjmp() and non-async-signal-safe functions
See http://austingroupbugs.net/view.php?id=516#c1195.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| -rw-r--r-- | man3/setjmp.3 | 3 | ||||
| -rw-r--r-- | man7/signal.7 | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/man3/setjmp.3 b/man3/setjmp.3 index 2241929bad..51de8a8ba8 100644 --- a/man3/setjmp.3 +++ b/man3/setjmp.3 @@ -299,7 +299,7 @@ POSIX.1-2008 Technical Corrigendum 2 adds .\" http://austingroupbugs.net/view.php?id=516#c1195 .BR longjmp () and -.BR setlongjmp () +.BR siglongjmp () to the list of async-signal-safe functions. However, the standard recommends avoiding the use of these functions from signal handlers and goes on to point out that @@ -324,6 +324,5 @@ call to a non-async-signal-safe function and no non-async-signal-safe functions are called after returning from the initial call to .IR main (). -.IR main (). .SH SEE ALSO .BR signal (7) diff --git a/man7/signal.7 b/man7/signal.7 index e57e751e86..83263055a9 100644 --- a/man7/signal.7 +++ b/man7/signal.7 @@ -474,7 +474,14 @@ at some arbitrary point in the execution of the program. POSIX has the concept of "safe function". If a signal interrupts the execution of an unsafe function, and .I handler -calls an unsafe function, then the behavior of the program is undefined. +either calls an unsafe function or +.I handler +terminates via a call to +.BR longjmp () +or +.BR siglongjmp () +and the program subsequently calls an unsafe function, +then the behavior of the program is undefined. POSIX.1-2004 (also known as POSIX.1-2001 Technical Corrigendum 2) requires an implementation to guarantee that the following |
