summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/abort.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2004-01-20 19:35:17 +0000
committermillert <millert@openbsd.org>2004-01-20 19:35:17 +0000
commit3463b6219e970da0f17b06915de60f0c059f19a3 (patch)
tree31de12da72a21c6595d8acba2b1661ee8b028c0c /lib/libc/stdlib/abort.c
parentSupport for i852/855/865 AGP; from NetBSD via Michael van der (diff)
downloadwireguard-openbsd-3463b6219e970da0f17b06915de60f0c059f19a3.tar.xz
wireguard-openbsd-3463b6219e970da0f17b06915de60f0c059f19a3.zip
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@
Diffstat (limited to 'lib/libc/stdlib/abort.c')
-rw-r--r--lib/libc/stdlib/abort.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/stdlib/abort.c b/lib/libc/stdlib/abort.c
index 3f32dc5dc11..2430c124f99 100644
--- a/lib/libc/stdlib/abort.c
+++ b/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 <signal.h>
@@ -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);
}