note
ChOas
Hi!
Just keep track in your parent to see if/how many times ctrl-c was pressed:
like :
<code>
[...]
my $pid = fork;
my $dontDie = 2;
[...]
</code>
And then in your Interrupt routine:
<code>
$SIG{INT} = sub {
die "This is the end" unless --$dontDie;
warn "Sending sig INT to child PID $pid";
kill 'INT' => $pid;
};
</code>
(This is just a quick fix, do please pay close attention to jbert's comments)
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-3568">
<BR>
GreetZ!,<BR><UL>ChOas</UL>
<BR>
<FONT SIZE="1">print "profeth still\n" if /bird|devil/;</FONT>
</div></div>
652103
652103