On 15 Apr 2008, at 13:59, Perrin Harkins wrote:
On Tue, Apr 15, 2008 at 8:51 AM, Mark Blackman <[EMAIL PROTECTED]>
wrote:
While I did find Torsten Förtsch's very useful Perl::AfterFork
module,
surely the
mod_perl code must be doing something like this itself, no?
I've been using fork, mod_perl, and $$ for years without a single
problem. Did you have some trouble that sent you looking for this
module?
See http://www.jsw4.net/info/listserv_archives/mod_perl/07-wk25/
msg00002.html
and
http://www.issociate.de/board/post/445529/
Process_ID_when_called_from_PerlChildInitHandler.html
And now I'm having trouble getting sense out of Apache::DProf because
$$ is wrong (and it's dumping all the child's output into the
parent's tmon.out)
My assumption is that perl caches the PID on startup and
only reinitializes on perl fork(), thus in the embedded case
a fork() outside the perl API doesn't reinitialize $$ at least
for some cases.
I'd love someone to explain why that's not the whole story, as
I'm sure it's not as this problem is clearly not global to all
mod_perl users.
- Mark