From: Philip Homburg Date: Mon, 23 Apr 2007 12:13:51 +0000 (+0000) Subject: Type _exit and abort before generating a trap. X-Git-Tag: v3.1.4~431 X-Git-Url: http://zhaoyanbai.com/repos/%24relpath%24doxygen.css?a=commitdiff_plain;h=4ce2267dd30dfa37401a3c5e342860900851dc9e;p=minix.git Type _exit and abort before generating a trap. --- 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(;;) { } }