Re: InactiveDestroy with Class::DBI

2005-11-08 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Aaron Turner asked: > So I'm trying to track down a problem with my program which forks > needing both parent and children to have access to the database via > Class::DBI. The basic issue I'm having is that after the first child > exits, the parent'

Re: InactiveDestroy with Class::DBI

2005-11-07 Thread Jonathan Leffler
On 11/7/05, Aaron Turner <[EMAIL PROTECTED]> wrote: > On Nov 7, 2005, at 8:57 PM, Jonathan Leffler wrote: > > On 11/6/05, Aaron Turner <[EMAIL PROTECTED]> wrote: > > > > When I run my code, I see the > >> $dbh hash change inside of the child process and the parent hash stay > >> the same. Aren't I

Re: InactiveDestroy with Class::DBI

2005-11-07 Thread Aaron Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Right, but that's what InactiveDestroy is for. Otherwise when the child exits it will call DESTROY on the handle and close the parent's connection to the DB. Turning on InactiveDestroy in the child turns off the implicit call to disconnect fro

Re: InactiveDestroy with Class::DBI

2005-11-07 Thread Aaron Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Nov 7, 2005, at 8:57 PM, Jonathan Leffler wrote: On 11/6/05, Aaron Turner <[EMAIL PROTECTED]> wrote: When I run my code, I see the $dbh hash change inside of the child process and the parent hash stay the same. Aren't I avoiding using the same

Re: InactiveDestroy with Class::DBI

2005-11-07 Thread louis gonzales
Given that, ALL children threads from a fork inherit the attributes of the parent, when you issue the undef from within the child, with a named handle, from the parent, it's likely that this disconnects that handle and ALL sibling threads also have the same, disconnected view. When I was progr

Re: InactiveDestroy with Class::DBI

2005-11-07 Thread Jonathan Leffler
On 11/6/05, Aaron Turner <[EMAIL PROTECTED]> wrote: > Can you explain why you think that? It's is the normal source of trouble when someone mentions fork and failure. I didn't scrutinize your code - if I missed something obvious, I apologize for casting aspersions. When I run my code, I see t

Re: InactiveDestroy with Class::DBI

2005-11-07 Thread Tim Bunce
On Sat, Nov 05, 2005 at 12:20:57PM -0800, Aaron Turner wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > So I'm trying to track down a problem with my program which forks > needing both parent and children to have access to the database via > Class::DBI. The basic issue I'm having

Re: InactiveDestroy with Class::DBI

2005-11-06 Thread Aaron Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Jonathan, Can you explain why you think that? When I run my code, I see the $dbh hash change inside of the child process and the parent hash stay the same. Aren't I avoiding using the same handle by doing a $dbh = undef in the child and th

Re: InactiveDestroy with Class::DBI

2005-11-05 Thread Jonathan Leffler
On 11/5/05, Aaron Turner <[EMAIL PROTECTED]> wrote: > So I'm trying to track down a problem with my program which forks > needing both parent and children to have access to the database via > Class::DBI. The basic issue I'm having is that after the first child > exits, the parent's DBI connection

InactiveDestroy with Class::DBI

2005-11-05 Thread Aaron Turner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 So I'm trying to track down a problem with my program which forks needing both parent and children to have access to the database via Class::DBI. The basic issue I'm having is that after the first child exits, the parent's DBI connection seems