http://www.perlmonks.org?node_id=1010961


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.