mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-20 08:44:33 +00:00
POSIX requires stdio buffers be flushed on abort.
Obtained from: OpenBSD, Thorsten Lockert <tholo@OpenBSD.ORG>
This commit is contained in:
parent
d1f8ff8c2e
commit
a3f90e9bd5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19189
|
@ -44,11 +44,19 @@ static char sccsid[] = "@(#)abort.c 8.1 (Berkeley) 6/4/93";
|
|||
#include "pthread_private.h"
|
||||
#endif
|
||||
|
||||
void (*__cleanup)();
|
||||
|
||||
void
|
||||
abort()
|
||||
{
|
||||
sigset_t mask;
|
||||
|
||||
/*
|
||||
* POSIX requires we flush stdio buffers on abort
|
||||
*/
|
||||
if (__cleanup)
|
||||
(*__cleanup)();
|
||||
|
||||
sigfillset(&mask);
|
||||
/*
|
||||
* don't block SIGABRT to give any handler a chance; we ignore
|
||||
|
|
Loading…
Reference in a new issue