Opened 15 years ago

Closed 15 years ago

#3265 closed bug (fixed)

Custom signal handlers always receive SIGSEGV signals

Reported by: oco Owned by: bonefish
Priority: high Milestone: R1
Component: System/Kernel Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

While tracking down remaining bugs in the freepascal test suite, i discover that custom signal handlers only received SIGSEGV signal instead of the one associated with the handler.

For example, in case of a zero divide, the signal handler associated with SIGFPE (8) only receive SIGSEGV (11).

This behavior is also true for C programs (see attached file test_custom_signal_handling.c).

I think this problem was introduced in hrev27757.

If i am not wrong, send_signal should send the real signal to the custom handler instead of SIGSEGV (see attached patch).

Attachments (2)

test_custom_signal_handling.c (568 bytes ) - added by oco 15 years ago.
arch_int.c_r28821.diff (486 bytes ) - added by oco 15 years ago.

Download all attachments as: .zip

Change History (5)

by oco, 15 years ago

Attachment: arch_int.c_r28821.diff added

comment:1 by axeld, 15 years ago

Owner: changed from axeld to bonefish
Priority: normalhigh

comment:2 by bonefish, 15 years ago

The patch looks fine. If anyone has the time to apply and test it, feel free to commit.

comment:3 by axeld, 15 years ago

Resolution: fixed
Status: newclosed

Patch applied in hrev28852, thanks Olivier!

Note: See TracTickets for help on using tickets.