Hi group,

I try to catch a signal, write out some statistics about my running
perl program and continue afterwards with the program.

use strict;
no  utf8;
use MyProgram::Lib;
use Encode;
use Socket;
use File::Path;
use File::Find;
use Getopt::Std;
die("MyProgram::Lib->new failed\n") if ( !(my $init = MyProgram::Lib->init) );
$SIG{ILL} = \&write_status;
:
sub write_status
{
    my $sigName = shift;

    print( STDERR "Signal ILL catched" );
    return;
}
Within bash I send the signal with "kill -4 <procID>"
Unfortunately my program die after catching the signal.
Without the print it dies too.
Also within debugger (perl -d:ptkdb) it dies after the return statement.

Is it possible to interrupt a perl program and continue afterwards?

Thanks
Matthias
-- 
Don't Panic


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to