Then you want a signal handler. lookup SIG in the PERL docs. Also, try this link:
http://elib.cs.berkeley.edu/~loretta/perl/nmanual/pod/perlipc/Signals.html Iman Mayes -----Original Message----- From: Agarwal, Ramakant [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 03, 2002 10:05 AM To: Mayes, Iman; Agarwal, Ramakant; [EMAIL PROTECTED] Subject: RE: doubt What I am trying to say is that killing the execution that means either through (ctrl+c) or (kill command of unix). I have written a subroutine for the above purpose but I want this subroutine to be called whenever killing the execution happens.I am not sure if putting the disconnect inside an END function will help.Can you please point to some link for this because I did not get much of whatever you suggested. Thanks, Ramakant -----Original Message----- From: Mayes, Iman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 03, 2002 7:29 PM To: Agarwal, Ramakant; [EMAIL PROTECTED] Subject: RE: doubt Place the disconnect from the database and any other cleanup inside of an END{} subroutine. If you need more info, check regular PERL documentation (specifically for END). Hope this helps. Iman -----Original Message----- From: Agarwal, Ramakant [mailto:[EMAIL PROTECTED]] Sent: Monday, September 02, 2002 11:02 AM To: '[EMAIL PROTECTED]' Subject: doubt Hi all, I require your help regarding the following I have a perl script which is connecting to an Oracle database and is executing different queries. I am using Oraperl for executing different queries. I want that if someone kills the process while the script is in execution then it should log off from the database and then should exit. Does the log off from the db happen automatically whenever a process is killed or we do need to explicitly handle this? Thanks, Ramakant