Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Problem with module for forked processes

by philipbailey (Curate)
on Nov 04, 2015 at 16:51 UTC ( [id://1146915] : note . print w/replies, xml ) Need Help??


in reply to Problem with module for forked processes

As you say, if a process inherits a database handle from its parent, there are problems. Don't do that then. Where possible, don't create the handle until after the fork. If that's not feasible, close the inherited handle in the child and then reconnect to the database.