Take a look at the manual page for signal, noting that you should avoid using it in favor of sigaction instead. There is some good background information in the page, however, making it worth a read.
At the bottom of the page, in the SEE ALSO section which lists the utilities and library functions having to do with signal that are also worth a read (and, of course, check the SEE ALSO sections of those manual pages).
Don't forget to read the sigaction manual page (and the SEE ALSO there).
Signals fall in the realm of black magic in many ways -- not as many as the IPC functions do but weirdness is the norm.
The sigaltstack() function may be of the most interest for your question.
Hope this helps some.