version 1.30, 2006/10/21 19:22:03
|
version 1.31, 2006/10/21 22:13:49
|
Line 95 graceful_exit (int sig)
|
Line 95 graceful_exit (int sig)
|
|
|
jmp_buf throw_jmp_buf; |
jmp_buf throw_jmp_buf; |
|
|
|
void throw(int code) |
|
{ |
|
longjmp(throw_jmp_buf,code); /* !! or use siglongjmp ? */ |
|
} |
|
|
static void |
static void |
signal_throw(int sig) |
signal_throw(int sig) |
{ |
{ |
Line 120 signal_throw(int sig)
|
Line 125 signal_throw(int sig)
|
sigprocmask(SIG_SETMASK, &emptyset, NULL); |
sigprocmask(SIG_SETMASK, &emptyset, NULL); |
} |
} |
#endif |
#endif |
longjmp(throw_jmp_buf,code); /* !! or use siglongjmp ? */ |
throw(code); |
} |
} |
|
|
#ifdef SA_SIGINFO |
#ifdef SA_SIGINFO |
Line 160 static void fpe_handler(int sig, siginfo
|
Line 165 static void fpe_handler(int sig, siginfo
|
#endif |
#endif |
default: code=-55; break; |
default: code=-55; break; |
} |
} |
longjmp(throw_jmp_buf,code); |
throw(code); |
} |
} |
|
|
|
|
Line 193 static void segv_handler(int sig, siginf
|
Line 198 static void segv_handler(int sig, siginf
|
code=-44; |
code=-44; |
else if (JUSTOVER(addr, NEXTPAGE(h->fp_stack_base+h->fp_stack_size))) |
else if (JUSTOVER(addr, NEXTPAGE(h->fp_stack_base+h->fp_stack_size))) |
code=-45; |
code=-45; |
longjmp(throw_jmp_buf,code); |
throw(code); |
} |
} |
|
|
#endif /* defined(SA_SIGINFO) */ |
#endif /* defined(SA_SIGINFO) */ |