in reply to Problem with signal handler
Hi!
Just keep track in your parent to see if/how many times ctrl-c was pressed:
like :
GreetZ!,
print "profeth still\n" if /bird|devil/;
And then in your Interrupt routine:[...] my $pid = fork; my $dontDie = 2; [...]
(This is just a quick fix, do please pay close attention to jbert's comments)$SIG{INT} = sub { die "This is the end" unless --$dontDie; warn "Sending sig INT to child PID $pid"; kill 'INT' => $pid; };
GreetZ!,
- ChOas
print "profeth still\n" if /bird|devil/;
|
---|
In Section
Seekers of Perl Wisdom