Loading...
--- Libc/Libc-763.13/stdlib/FreeBSD/abort.c
+++ Libc/Libc-320/stdlib/FreeBSD/abort.c
@@ -10,6 +10,10 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -31,17 +35,20 @@
static char sccsid[] = "@(#)abort.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libc/stdlib/abort.c,v 1.11 2007/01/09 00:28:09 imp Exp $");
+__FBSDID("$FreeBSD: src/lib/libc/stdlib/abort.c,v 1.8 2002/07/10 16:35:02 wollman Exp $");
-#include "namespace.h"
#include <signal.h>
#include <stdlib.h>
#include <stddef.h>
#include <unistd.h>
#include <pthread.h>
-#include "un-namespace.h"
-#include "libc_private.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()
@@ -61,8 +68,8 @@
* any errors -- ISO C doesn't allow abort to return anyway.
*/
sigdelset(&act.sa_mask, SIGABRT);
- (void)_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL);
- (void)raise(SIGABRT);
+ (void)__sys_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL);
+ (void)kill(getpid(), SIGABRT);
/*
* If SIGABRT was ignored, or caught and the handler returns, do
@@ -71,9 +78,9 @@
act.sa_handler = SIG_DFL;
act.sa_flags = 0;
sigfillset(&act.sa_mask);
- (void)_sigaction(SIGABRT, &act, NULL);
+ (void)__sys_sigaction(SIGABRT, &act, NULL);
sigdelset(&act.sa_mask, SIGABRT);
- (void)_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL);
- (void)raise(SIGABRT);
+ (void)__sys_sigprocmask(SIG_SETMASK, &act.sa_mask, NULL);
+ (void)kill(getpid(), SIGABRT);
exit(1);
}