Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: die/warn signal handler best practice questions

by TOD (Friar)
on Oct 08, 2007 at 03:50 UTC ( #643376=note: print w/ replies, xml ) Need Help??


in reply to die/warn signal handler best practice questions

in general: don't trust people telling you to never do this or that. ;)
second, i think you overestimate the complexity of that handler problem. as you can see from e.g. perldoc -f local, it's very easy to let every process take control over its own reactions on __DIE__ and __WARN__ signals. and if you strictly distiguish between the process and the modules it loads it becomes fairly clear (to me), that a module should simply die, whilst the process redirects that signal to maybe a logging thread or any other appropriate stuff.

--------------------------------
masses are the opiate for religion.


Comment on Re: die/warn signal handler best practice questions
Select or Download Code
Re^2: die/warn signal handler best practice questions
by bsb (Priest) on Oct 08, 2007 at 23:23 UTC
    What you say is true for applications, but I'm trying to write a module that installs die/warn handlers.

    I could just return the handler to install and let the user do the local($SIG{..}) in the correct scope... That's an awkward interface, but might but useful in some circumstances.

    Thanks for your comments

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (13)
As of 2014-10-23 19:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (128 votes), past polls