use sigtrap 'handler' => &sig_handler, KILL;

&sig_handler{
  #your clean up code you want executed
}

sigtrap can be found on cpan, there are more ways to use it... Documented
there.


SrA Jensen

-----Original Message-----
From: Ken Lehman [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, December 17, 2002 10:52 AM
To: '[EMAIL PROTECTED]'
Subject: catch kill -9 from unix command prompt


Is there a way for my program to execute a few lines of code before dying
when it is sent a kill -9 from a unix shell? The book I have says no, I
don't want to ignore the signal, just some clean up. Thanks. -Ken

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's own,
and do not necessarily represent the views and opinions of Summit Systems
Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to