From 4ce2267dd30dfa37401a3c5e342860900851dc9e Mon Sep 17 00:00:00 2001 From: Philip Homburg Date: Mon, 23 Apr 2007 12:13:51 +0000 Subject: [PATCH] Type _exit and abort before generating a trap. --- lib/syslib/panic.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/syslib/panic.c b/lib/syslib/panic.c index dae8adbcc..89d3a41ac 100644 --- a/lib/syslib/panic.c +++ b/lib/syslib/panic.c @@ -30,13 +30,21 @@ int num; /* number to go with format string */ } } + /* Try exit */ + _exit(1); + + /* Try to signal ourself */ + abort(); + /* If exiting nicely through PM fails for some reason, try to * commit suicide. E.g., message to PM might fail due to deadlock. */ + printf("panic: trying exception\n"); suicide = (void (*)(void)) -1; suicide(); /* If committing suicide fails for some reason, hang. */ + printf("panic: for ever and ever\n"); for(;;) { } } -- 2.44.0