Keeping a database connection across a fork

2001-09-01 Thread Jay Strauss
Hi, I'm trying to write a daemon that accesses my database. I thought I could create the connection in the parent, and use it in the child. But that doesn't seem to work. Below is the code. Any help would be appreciated Thanks Jay #!/usr/bin/perl -w use strict; use DBI; use POSIX

Re: Keeping a database connection across a fork

2001-09-01 Thread Stephen Clouse
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, Aug 29, 2001 at 03:23:39PM -0500, Jay Strauss wrote: I'm trying to write a daemon that accesses my database. I thought I could create the connection in the parent, and use it in the child. But that doesn't seem to work. Below is the

Re: Keeping a database connection across a fork

2001-09-01 Thread Steven Lembark
-- Stephen Clouse [EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, Aug 29, 2001 at 03:23:39PM -0500, Jay Strauss wrote: I'm trying to write a daemon that accesses my database. I thought I could create the connection in the parent, and use it in the child. But

Re: Keeping a database connection across a fork

2001-09-01 Thread Stephen Clouse
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sat, Sep 01, 2001 at 02:30:57PM -0500, Steven Lembark wrote: Actually you can. Trick is to turn on the NO-DESTROY option (forgot the exact keyword) and let the children destroy things when they exit. It's actually fairly workable to share a

Re: Keeping a database connection across a fork

2001-09-01 Thread qmi
Hi, All: I have the almost same problems and I tried to initiate the database connection in the child. But every time I can only make database connection and do something only once. If I want to do it again it always shows me the application error and my server is killed(the program exit).