Browse Source

POSIX requires stdio buffers be flushed on abort

OPENBSD_2_1
tholo 28 years ago
parent
commit
7128f5a83e
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      src/lib/libc/stdlib/abort.c

+ 7
- 1
src/lib/libc/stdlib/abort.c View File

@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char *rcsid = "$OpenBSD: abort.c,v 1.2 1996/08/19 08:33:20 tholo Exp $";
static char *rcsid = "$OpenBSD: abort.c,v 1.3 1996/10/25 03:09:15 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
#include <signal.h>
@ -44,6 +44,12 @@ 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…
Cancel
Save