On Thu, Aug 25, 2005 at 11:10:37PM +0000, Ranga Nathan wrote:

> I need to remember the last record processed no matter how a script
> completes - kill or stop.

You can't capture SIGKILL.

> 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?

Not capturing SIGINT.

If you really need to cope with the effects of a SIGKILL, then you need
to do a bit more work.  Go and read about how RDBMSes guarantee
consistency.  Once you've worked around the effects of SIGKILL, then you
have, of course, no need for the other signal handlers.

-- 
David Cantrell | top google result for "internet beard fetish club"

      Blessed are the pessimists, for they test their backups
                                            -- anon
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to