POSIX requires stdio buffers be flushed on abort.

Obtained from:	OpenBSD, Thorsten Lockert <tholo@OpenBSD.ORG>
This commit is contained in:
Alexander Langer 1996-10-26 01:42:33 +00:00
parent d1f8ff8c2e
commit a3f90e9bd5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19189

View file

@ -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