John Ripley writes:
> Olaf Weber wrote:
>> volatile caddr_t bad_addr;
>> jmp_buf env;
>>
>> void sigbus_action(int sig, siginfo_t *siginfo, void *dummy)
>> {
>> if (siginfo) {
>> bad_addr = siginfo->si_addr;
>> }
>> longjmp(env, 1);
>> }
> longjmp won't work because it'll be running the program from within
> the signal handler.
You are definitely allowed to use longjmp to return from a signal
handler when the signal was produced by raise(3) or abort(3). Many
systems, AFAIK Linux among them, allow you to use longjmp in the
general case.
-- Olaf WeberDo not meddle in the affairs of sysadmins, for they are quick to anger and have no need for subtlety.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:07 EST