Code Comments
Programming Forum and web based access to our favorite programming groups.Hi, I am writing a perl application that connect to a database and then does a fork() The child completes the process and does a exit(), but the problem is it closes the database connection which the parent would like to use. Can I exit the child process without disconnecting the parent dbi handle Thanks Ram ---------------------------------------------------------- Netcore Solutions Pvt. Ltd. Website: http://www.netcore.co.in Spamtraps: http://cleanmail.netcore.co.in/directory.html ----------------------------------------------------------
Post Follow-up to this messageRampraA Padmanabhan wrote: > Hi, > I am writing a perl application that connect to a database and then > does a fork() > The child completes the process and does a exit(), but the problem is > it closes the database connection which the parent would like to use. > > Can I exit the child process without disconnecting the parent dbi > handle I would strongly recommend you connect after the fork. Each process needs to have its own connection.
Post Follow-up to this messageI agree with Bob. Why do you want the parent process to handle the database connection. What is the purpose of the child process after the fork?
Post Follow-up to this message> I would strongly recommend you connect after the fork. Each process needs to > have its own connection. Thanks for the reply. Even I had thought so, probably for efficiency I can use dbi cached_connect Ram ---------------------------------------------------------- Netcore Solutions Pvt. Ltd. Website: http://www.netcore.co.in Spamtraps: http://cleanmail.netcore.co.in/directory.html ----------------------------------------------------------
Post Follow-up to this messageOn 30/03/2005, RampraA Padmanabhan wrote: > I am writing a perl application that connect to a database and then > does a fork() > The child completes the process and does a exit(), but the problem is > it closes the database connection which the parent would like to use. > > Can I exit the child process without disconnecting the parent dbi > handle Have you read the 'InactiveDestroy' entry in perldoc DBI? -- felix
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.