xref: /csrg-svn/lib/libc/stdlib/abort.c (revision 26540)
121338Sdist /*
224054Skarels  * Copyright (c) 1985 Regents of the University of California.
321338Sdist  * All rights reserved.  The Berkeley software License Agreement
421338Sdist  * specifies the terms and conditions for redistribution.
521338Sdist  */
617866Sralph 
7*26540Sdonn #if defined(LIBC_SCCS) && !defined(lint)
8*26540Sdonn static char sccsid[] = "@(#)abort.c	5.3 (Berkeley) 03/09/86";
9*26540Sdonn #endif LIBC_SCCS and not lint
1021338Sdist 
1117866Sralph /* C library -- abort */
1217866Sralph 
1317866Sralph #include "signal.h"
1417866Sralph 
1517866Sralph abort()
1617866Sralph {
1717866Sralph 	sigblock(~0);
1817866Sralph 	signal(SIGILL, SIG_DFL);
1917866Sralph 	sigsetmask(~sigmask(SIGILL));
2024054Skarels 	kill(getpid(), SIGILL);
2117866Sralph }
22