Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: When to use sigtrap, when to assign to %SIG?

by Old_Gray_Bear (Bishop)
on Jan 02, 2012 at 08:50 UTC ( #945867=note: print w/ replies, xml ) Need Help??


in reply to When to use sigtrap, when to assign to %SIG?

You use the sigtrap pragma when you need the extra mojo it supplies. In absence of any code, any further answer would be pure speculation.

"Is local $SIG{INT} important?" -- that would depend on how it's used in the code that you haven't shown us. In absence of any code, any further answer would be pure speculation.

UPDATE -- Fixed the link; thanks tanktalus

----
I Go Back to Sleep, Now.

OGB


Comment on Re: When to use sigtrap, when to assign to %SIG?
Download Code
Re^2: When to use sigtrap, when to assign to %SIG?
by Anonymous Monk on Jan 02, 2012 at 09:37 UTC

    You use the sigtrap pragma when you need the extra mojo it supplies. In absence of any code, any further answer would be pure speculation.

    What mojo? Yes, do speculate

    "Is local $SIG{INT} important?" -- that would depend on how it's used in the code that you haven't shown us. In absence of any code, any further answer would be pure speculation.

    Is using local $SIG... important?

      Is using local $SIG... important?
      Sometimes it is. Usually, it doesn't matter as you want the same handler for the entire run of your program. Most of the time though, it doesn't hurt to have it localized.

      As a rule of thumb, I always localize my sig handlers, unless there's a good reason not to.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2014-04-18 12:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (466 votes), past polls