From 8ad0502d4b92b34ae8cdc05181efcea7cff76c14 Mon Sep 17 00:00:00 2001 From: millert <> Date: Tue, 20 Jan 2004 19:35:17 +0000 Subject: Call _exit() not exit() from abort() if we are unable to kill ourselves to avoid flushing stdio twice. This code path should never really happen though. Also make the function declaration ANSI. OK deraadt@ --- src/lib/libc/stdlib/abort.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/libc/stdlib/abort.c b/src/lib/libc/stdlib/abort.c index 3f32dc5dc1..2430c124f9 100644 --- a/src/lib/libc/stdlib/abort.c +++ b/src/lib/libc/stdlib/abort.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: abort.c,v 1.12 2003/06/02 20:18:37 millert Exp $"; +static char *rcsid = "$OpenBSD: abort.c,v 1.13 2004/01/20 19:35:17 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -38,7 +38,7 @@ static char *rcsid = "$OpenBSD: abort.c,v 1.12 2003/06/02 20:18:37 millert Exp $ #include "atexit.h" void -abort() +abort(void) { struct atexit *p = __atexit; static int cleanup_called = 0; @@ -74,5 +74,5 @@ abort() (void)signal(SIGABRT, SIG_DFL); (void)_thread_sys_sigprocmask(SIG_SETMASK, &mask, (sigset_t *)NULL); (void)kill(getpid(), SIGABRT); - exit(1); + _exit(1); } -- cgit v1.2.3-55-g6feb