Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: receive siginfo for real time signals.

by chip (Curate)
on Apr 20, 2004 at 01:18 UTC ( #346499=note: print w/ replies, xml ) Need Help??


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


Comment on Re: receive siginfo for real time signals.
Re: Re: receive siginfo for real time signals.
by powerman (Friar) on Apr 20, 2004 at 01:53 UTC
    Hmm... but, if this signal handler setup looks mostly safe, then why perl internal signal handler are so complex, even for unsafe signals?
      I'm afraid that question doesn't make a lot of sense to me. But if you're asking what I think you're asking: It's because signal handling for unsafe signals calls Perl subroutines, and for safe signals, it sets multiple flags checked during OP running.

          -- Chip Salzenberg, Free-Floating Agent of Chaos

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://346499]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2014-09-16 01:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (155 votes), past polls