Thanks. I plan to change it to just do   DBIS->logfp = PerlIO_stderr();
Let me know if that won't work for you.

Tim.

On Wed, Jan 29, 2003 at 12:13:07PM -0800, Todd Richmond wrote:
> There is special code in dbi_bootinit() in DB.xs for Perl5.8 only that calls 
>fp_dup() to change the logfp variable to something other than PerlIO_stderr(). 
>Although the comment seems suspicious, the code seems to work fine for a normal 
>single threaded perl script. However, I have a C++ server that creates a pool of perl 
>interpreters using perl_clone(). In that case, any call into any child interpreter 
>(all descended from a single parent that parses the original perl script with 
>perl_parse()) causes a core dump. The crash happens by just adding "use DBI;" - no 
>other calls are required. Eliminating the call to fp_dup() and leaving the log as 
>stderr resolves the core dump. My server has been purified and executes numerous 
>other perl modules correctly, so there must be some problem with either the arguments 
>or the call itself
> 
> 
> #ifdef DBI_USE_THREADS
> #if (PERL_VERSION >= 8) /* fp_dup prototype changed in 5.8.0 */
>     /* XXX the fp_dup type param is a fudge, but fp_dup doesn't use it anyway */
>     DBIS->logfp  = parent_dbis ? fp_dup(parent_dbis->logfp,'>',0) : PerlIO_stderr();
> #endif
> #endif
> 
> Thanks,
>     Todd Richmond

Reply via email to