Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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

by LanX (Chancellor)
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


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?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2015-11-29 05:54 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (747 votes), past polls