Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: interrupting a daemon

by Zaxo (Archbishop)
on Oct 23, 2004 at 19:54 UTC ( #401880=note: print w/replies, xml ) Need Help??


in reply to interrupting a daemon

The DBI connection handle's destruction will close the connection, so there is no need to arrange for a signal handler to do it. If a statement handle may still be around with unread data, you can avoid a warning by calling finish() on it. I would do that in a DESTROY or END sub rather than in the signal handler.

I gave a blow-by blow account of what makes a daemon daemonic in Re: Creating a perl daemon.

After Compline,
Zaxo

Replies are listed 'Best First'.
Re^2: interrupting a daemon
by tachyon (Chancellor) on Oct 24, 2004 at 04:07 UTC

    The DBI connection handle's destruction will should close the connection.

    Unfortunately it is easy to show it does not always work that way out in the real world. Even the DBI docs suggest you explicitly disconnect. I can site personal experience with fairly current versions of Perl/DBI/DBD::Mysql that will let you accumulate open connections until you run out.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://401880]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2021-01-25 14:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?