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
@ -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 New Issue
Block a user