> Thank you. No guarantees, but try setting 'InactiveDestroy' when you > create the DB handle. XML::Twig uses a fork/exec call in 'parseurl' to > retrieve the URL in one process and to parse the XML in the other. When > the retrieval is complete one of the processes closes with an 'exit'. I > think because the $dbh is shared (because it just is) you are getting > the above result. The switch I mentioned appears to be designed for this > specific case. > > For more info see "InactiveDestroy" here: > > http://search.cpan.org/~timb/DBI-1.48/DBI.pm#ATTRIBUTES_COMMON_TO_ALL_HANDLES > > "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 on all their shared handles." > > HTH,
Hm... I get it and I don't get it... Who keeps the sub _dummy - the parent or the child? I need to use DBI in it so I guess InactiveDestroy must be set to true there. How do I find out who is who not at the time but after the fork? Is this portable to win32? (the final version must run on win32 as well). Actually from the little I know about forks I thought that both parent and child get copies of the very same stuff. So both get a "hot" DBI and DBD::Mysql tied to the same socket... if this is at all possible. On the other hand I am not using DBI anymore while in the reader (child?), just the parser, so it shouldn't matter... Wow I am even more confused now :) All above considered - I guess I would be safer downloading the file somewhere and doing safe_parsefile to avoid any forking altogether. Thanks for the hint -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>