atexit.3: Terminating registered function using longjmp() is undefined

According to POSIX.1, using longjmp() to terminate execution of
a function registered using atexit() produces undefined results.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2008-12-05 11:02:24 -05:00
parent d8437814df
commit 7c298e468d
1 changed files with 5 additions and 0 deletions

View File

@ -74,6 +74,11 @@ Functions registered using
.BR on_exit (3))
are not called if a process terminates abnormally because
of the delivery of a signal.
POSIX.1-2001 says that the result is undefined if
.BR longjmp (3)
is used to terminate execution of one of the functions registered
.BR atexit ().
.SS "Linux Notes"
Since glibc 2.2.3,
.BR atexit ()