taken off p5p so I don't look so stupid...
I have a workaround for mp2:
#if PERL_REVISION == 5 && PERL_VERSION == 8 && PERL_SUBVERSION == 1 { #ifdef THREADS_HAVE_PIDS #ifdef USE_ITHREADS MP_dSCFG(s); dTHXa(scfg->mip->parent->perl); PL_ppid = (IV)getppid(); #endif #endif } #endif
which can be run at the child_init phase, immediately after a new process is forked.
can you explain why this is important? I mean, why does mod_perl need to know the pid of the parent apache process? or, better, why is it important that mod_perl take the initiative and fix this. is a workaround patch in mod_perl core really required? what breaks if we don't fix it?
if any of your programs rely on geppid, they will now be either broken or don't do what you want. I've discovered it while porting Apache::VMonitor, which shows you all the httpd procs and their system's usage, calculating the memory usage and shared memory usage. getppid gives me 1, which completely blows out my algorithm for calculating shared memory usage since it needs to know the memory used by the parent httpd process.
Besides it's a bug, no matter how you look at it, because a C call to getppid() from the same process will do the right thing.
It had to be fixed locally in mp2 since 5.8.1 has been released already, meaning that anybody who uses 5.8.1 is vulnerable to this problem. Hopefully 5.8.2 will get it fixed in perl.
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]