summaryrefslogtreecommitdiff
path: root/src/exit/abort.c
AgeCommit message (Collapse)AuthorFilesLines
2012-09-06add _Noreturn function attribute, with fallback for pre-C11 GNUCRich Felker1-1/+1
2012-06-02ensure that abort always worksRich Felker1-0/+2
Per POSIX, "The abort() function shall cause abnormal process termination to occur, unless the signal SIGABRT is being caught and the signal handler does not return." If SIGABRT is blocked or if a signal handler is installed and does return, abort is still required to cause abnormal program termination. We cannot use a_crash() to do this, since a SIGILL handler could also be installed (and might even longjmp out of the abort, not expecting to be invoked from within abort), nor can we rely on resetting the signal handler and re-raising the signal (this has race conditions in multi-threaded programs). On the other hand, SIGKILL is a perfectly safe, unblockable way to obtain abnormal program termination, and it requires no ugly loop-and-retry logic.
2011-02-12initial check-in, version 0.5.0v0.5.0Rich Felker1-0/+8