<?xml version="1.0" encoding="windows-1252"?>
<node id="1010893" title="Re: sending signal to self with kill on windows (updated);" created="2012-12-30 00:54:08" updated="2012-12-30 00:54:08">
<type id="11">
note</type>
<author id="171588">
BrowserUk</author>
<data>
<field name="doctext">
&lt;blockquote&gt;&lt;i&gt;Why wasn't the %INC handler called?&lt;/i&gt;&lt;/blockquote&gt;

&lt;p&gt;What the heck is an &lt;i&gt;" %INC handler"&lt;/i&gt;?

&lt;p&gt;Update: assuming you mean %SIG handler; I think this demonstrates that the Perl Windows sig emulation has code to prevent a process from attempting to signal itself:&lt;code&gt;
C:\test&gt;start /b perl -E"say $$; sleep 10000"

C:\test&gt;192904

C:\test&gt;perl -E"kill 21, 192904 or die $^E"
Terminating on signal SIGBREAK(21)

C:\test&gt;perl -E"kill 21, $$ or say $^E; say 'ending';"
The parameter is incorrect
ending
&lt;/code&gt;

&lt;P&gt;It doesn't make a great deal of sense to signal yourself to invoke a subroutine when you can just:&lt;code&gt;
C:\test&gt;perl -wE"$SIG{BREAK}=sub{ say 'BREAKing' }; &amp;{$SIG{BREAK}}; say 'ending'; "
BREAKing
ending

&lt;/code&gt;


&lt;div class="pmsig"&gt;&lt;div class="pmsig-171588"&gt;
&lt;hr /&gt;
&lt;font size=1 &gt;
&lt;div&gt;With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'&lt;/div&gt;
&lt;div&gt;Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.&lt;/div&gt;
&lt;div&gt;"Science is about questioning the status quo. Questioning authority". &lt;/div&gt;
&lt;div&gt;In the absence of evidence, opinion is indistinguishable from prejudice.
&lt;/div&gt;
&lt;/font&gt;

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1010891</field>
<field name="parent_node">
1010891</field>
</data>
</node>
