On Mon, 2 Dec 2002 14:44:28 -0500  Daniel Quan <[EMAIL PROTECTED]> wrote:

> I am using the latest version of DBI and oracle 8i.
> 
> When my code forks and child exits it destroys the parent's connection to
> the database.
> I found some excerpt in working around the problem.
> One of the solution was InactiveDestroy set to 1.
> This did not solve the problem.
> 
> Stuart Hughes suggested using syscall(&Sys_exit,0)..in Solaris.
> My problem happens in IBM AIX and don't have syscall.h.

Look at InactiveDestroy in 'perldoc DBI', it should be set to 1 in the
child to prevent the connection from being destroyed when the child exits. 
I normally try to avoid having any open handles when I fork().  You
generally can't use a handle created in the parent in the child, but it
does get copied into the child's memory space and the reference goes out of
scope when the child exits.

-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.



Reply via email to