Raise SIGABRT on abort().
* lib/stdlib/abort.c (abort): Raise SIGABRT.
This commit is contained in:
parent
55d38162be
commit
4775de0021
|
@ -18,10 +18,16 @@
|
||||||
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
* along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
int __raise(int);
|
||||||
|
|
||||||
void
|
void
|
||||||
abort (void)
|
abort (void)
|
||||||
{
|
{
|
||||||
asm ("hlt");
|
if (__raise(SIGABRT) < 0) { /* could not raise SIGABRT */
|
||||||
|
/* Fail in any way possible */
|
||||||
|
unsigned char* x = (unsigned char*) 0;
|
||||||
|
*x = 2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue