For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > October 2006 > dbi ^C handling









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author dbi ^C handling
Ken Foskey

2006-10-07, 7:00 pm


I killed my update script with the DBI and it left the DB2 connection
hanging so I could not rerun until the DBA killed the thread the next
working day.

What is the preferred handling for killing scripts like this so they
clean up connections?

--
Ken Foskey


Jeff Pang

2006-10-07, 9:57 pm


>I killed my update script with the DBI and it left the DB2 connection
>hanging so I could not rerun until the DBA killed the thread the next
>working day.
>
>What is the preferred handling for killing scripts like this so they
>clean up connections?



It's a little strange that when you kill your script all file-handle or database-handle opened by this script should be shutdown.Or can you give a try to add the $dbh->disconnect statement in script's END {} block?

--
Jeff Pang
NetEase AntiSpam Team
http://corp.netease.com
Robin Sheat

2006-10-08, 3:58 am

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com