Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: sending signal to self with kill on windows (recursive sig-handler)

by LanX (Canon)
on Dec 30, 2012 at 21:12 UTC ( #1010961=note: print w/ replies, xml ) Need Help??


in reply to Re: sending signal to self with kill on windows (updated);
in thread sending signal to self with kill on windows

> I think this demonstrates that the Perl Windows sig emulation has code to prevent a process from attempting to signal itself:

Definitely! I had this at one of my projects...

My face and all my hairs went pale, when I realized that a young colleague of mine called warn within $SIG{__WARN__}-handler.

As it turned out Perl was (since 5.8 IIRC) idiot proof. It locally resets signal handler redirections before calling them.

My colleague insisted that I exaggerated, because she "tested" (i.e ran) it once before committing into production.

Her warn did depend on an if clause and "production" meant a central module of a mod-perl environment...

Cheers Rolf

UPDATE:

from warn

Most handlers must therefore make arrangements to actually display the warnings that they are not prepare +d to deal with, by calling "warn" again in the handler. Not +e that this is quite safe and will not produce an endless loop +, since "__WARN__" hooks are not called from inside one.


Comment on Re^2: sending signal to self with kill on windows (recursive sig-handler)
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2015-07-03 21:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (56 votes), past polls