in reply to
receive siginfo for real time signals.
Your signal handler setup looks mostly safe, as long as its used properly. You could add some more interlocks to make it safer, like disallowing setting a handler for a new signal if you still have it set for another.
As for calling into Perl... I can only answer "No!" using a loud voice because the louder voice doesn't have ASCII characters that will represent it. Unsafe signals are unsafe, period, and you must not go there. Really.
-- Chip Salzenberg, Free-Floating Agent of Chaos