Is anyone vetting the answers that are added to this FAQ?

Or, put another way, if I submit an entry that is just plain dead wrong, is there 
anyone who could catch it before my stupidity is inflicted on the entire planet?

FYI, my planned entry is:

Q: How do I share a database handle between a parent and its child process?

A: You don't. You give the child enough information to open its own connection and let 
it do so. There are two prime reasons for not sharing connections between parent and 
child processes:

1) There is no guarantee that the client libraries that talk to the database can 
handle two processes "talking" to the same connection.

2) The DBI connection handle may hold data that relates to the state of the 
connection. Once the parent and the child are separated, you have two different data 
structures in different memory spaces. Changes made to one are not automatically made 
to the other and can leave the handles in an inconsistent state.


--
Matthew


Reply via email to