Re: What happens to a db-library handle on a fork?

Michael Peppler <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase
Message-ID <[email protected]>
On Thu, 2005-02-03 at 17:35, Wechsler, Steven wrote:
> I'm creating a loop which will create multiple chld processes. Before
> the loop I open up a DB handle, which needs to stay open while this
> fork occurs, but the children do not need access to the database.
> Should I explicitly close the handle in each child, just ignore it, or
> do something else?

You should probably ignore it.

If you close it explicitly I suspect that the server will see that as
the connection being closed, and the parent will get an error if it
tries to access it.

Michael
-- 
Michael Peppler  -  [email protected]  -  http://www.peppler.org/
Sybase DBA/Developer
Sybase on Linux FAQ: http://www.peppler.org/FAQ/linux.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.