I need to remember the last record processed no matter how a script
completes - kill or stop.
My perl is a little rusty now. The following coding does not seem to work.

$SIG{KILL} = $SIG{STOP} = $SIG{TERM} = $SIG{__DIE__} =  sub { system ("echo
$last_rec > /tmp/ftpscan");die "Now I am stopping";};

When  I kill my script with Ctrl-C, I do not see the output of the "die".

What am I doing wrong?
__________________________________________
Ranga Nathan / CSG
Systems Programmer - Specialist; Technical Services;
BAX Global Inc. Irvine-California
Tel: 714-442-7591   Fax: 714-442-2840

 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to