X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/9385eb3d10ebe5eb398c52040ec3dbfba9b0cdcf..fbd86d4cc20b02a10edcca92fb7ae0a143e63cc4:/stdlib/FreeBSD/abort.c diff --git a/stdlib/FreeBSD/abort.c b/stdlib/FreeBSD/abort.c index 28acb30..18d0c73 100644 --- a/stdlib/FreeBSD/abort.c +++ b/stdlib/FreeBSD/abort.c @@ -35,21 +35,18 @@ static char sccsid[] = "@(#)abort.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ #include -__FBSDID("$FreeBSD: src/lib/libc/stdlib/abort.c,v 1.8 2002/07/10 16:35:02 wollman Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/stdlib/abort.c,v 1.9 2003/08/16 11:43:57 davidxu Exp $"); +#include "namespace.h" #include #include #include #include #include +#include "un-namespace.h" void (*__cleanup)(); -/* XXX - why are these declarations here? */ -extern int __sys_sigprocmask(int, const sigset_t *, sigset_t *); -extern int __sys_sigaction(int, const struct sigaction *, - struct sigaction *); - void abort() { @@ -68,8 +65,8 @@ abort() * any errors -- ISO C doesn't allow abort to return anyway. */ sigdelset(&act.sa_mask, SIGABRT); - (void)__sys_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL); - (void)kill(getpid(), SIGABRT); + (void)_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL); + (void)raise(SIGABRT); /* * If SIGABRT was ignored, or caught and the handler returns, do @@ -78,9 +75,9 @@ abort() act.sa_handler = SIG_DFL; act.sa_flags = 0; sigfillset(&act.sa_mask); - (void)__sys_sigaction(SIGABRT, &act, NULL); + (void)_sigaction(SIGABRT, &act, NULL); sigdelset(&act.sa_mask, SIGABRT); - (void)__sys_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL); - (void)kill(getpid(), SIGABRT); + (void)_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL); + (void)raise(SIGABRT); exit(1); }