summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libc/stdlib/abort.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/abort.c b/src/lib/libc/stdlib/abort.c
index e849575396..8f326d15db 100644
--- a/src/lib/libc/stdlib/abort.c
+++ b/src/lib/libc/stdlib/abort.c
@@ -32,7 +32,7 @@
32 */ 32 */
33 33
34#if defined(LIBC_SCCS) && !defined(lint) 34#if defined(LIBC_SCCS) && !defined(lint)
35static char *rcsid = "$OpenBSD: abort.c,v 1.2 1996/08/19 08:33:20 tholo Exp $"; 35static char *rcsid = "$OpenBSD: abort.c,v 1.3 1996/10/25 03:09:15 tholo Exp $";
36#endif /* LIBC_SCCS and not lint */ 36#endif /* LIBC_SCCS and not lint */
37 37
38#include <signal.h> 38#include <signal.h>
@@ -44,6 +44,12 @@ abort()
44{ 44{
45 sigset_t mask; 45 sigset_t mask;
46 46
47 /*
48 * POSIX requires we flush stdio buffers on abort
49 */
50 if (__cleanup)
51 (*__cleanup)();
52
47 sigfillset(&mask); 53 sigfillset(&mask);
48 /* 54 /*
49 * don't block SIGABRT to give any handler a chance; we ignore 55 * don't block SIGABRT to give any handler a chance; we ignore