diff --git a/man3/setjmp.3 b/man3/setjmp.3 index 2241929ba..51de8a8ba 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 e57e751e8..83263055a 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