in reply to Re: Sharing a database connection across fork()
in thread Sharing a database connection across fork()
(Note that I edited the above to replace the clone() call with a connect() call, as recommended by wrog.) Thanks to all!(Parent) establish database connection in $dbh. (Parent) Fork. (Child) $dbh_child = $dbh->connect(inherited connection parameters); (Child) $dbh->{InactiveDestroy} = 1; (Child) undef $dbh; (Child) # proceed to use $dbh_child (Parent) # proceed to use $dbh (Child) exit; (Parent) # continue using $dbh
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Sharing a database connection across fork()
by wrog (Friar) on Sep 13, 2014 at 01:08 UTC | |
by ibm1620 (Chaplain) on Sep 15, 2014 at 23:29 UTC |