Custom signal handlers always receive SIGSEGV signals
|Reported by:||oco||Owned by:||bonefish|
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).