What happened whey you tried it?
You should be able to answer that by actually taking the time
to run your code.
No. If the test program crashes immediatly you know that the parent
process is affected. But what if works ok? You still don't know that a
more complex program will work, maybe under higher load.
What you should do is read perldoc DBI and search for "fork". You will
find this section:
"InactiveDestroy" (boolean)
The default value, false, means a handle will be fully destroyed as
normal when the last reference to it is removed, just as you’d expect.
If set true then the handle will be treated by the DESTROY as if it was
no longer Active, and so the database engine related effects of
DESTROYing a handle will be skipped.
Think of the name as meaning ’treat the handle as not-Active in the
DESTROY method’.
For a database handle, this attribute does not disable an explicit call
to the disconnect method, only the implicit call from DESTROY that
happens if the handle is still marked as "Active".
This attribute is specifically designed for use in Unix applications
that "fork" child processes. Either the parent or the child process,
but not both, should set "InactiveDestroy" true on all their shared
handles. (Note that some databases, including Oracle, don’t support
passing a database connection across a fork.)
hp