Thanks for the reply.  I'd figured out earlier today that I probably should be using Apache::SubProcess so it's good to see confirmation.  A few lines of code replaced 50+.  It's a good thing.
 
When spawn_proc_prog() is called I get a segfault in strrchr when modperl_spawn_proc_prog calls ap_make_dirstr_parent, which then calls strrchr.  Unfortunately, my Perl 5.8 and Apache are not compiled with debugging on so I'm recompiling all now.  More later....
 
Understand re: cleanup_for_exec
 
I read the Avoiding Zombies section and $SIG{CHLD} = 'IGNORE' didn't work for me.  I realize that I didn't try the waitpid() example after the fork.

Stas Bekman <[EMAIL PROTECTED]> wrote:

Scot Martin wrote:
> mp1.99.10-dev Apache 2.0.47 Solaris 8
>
> I'm building a single-purpose, high-performance, multi-threaded application
> server using the above and have run into problems with forking and cleanup
> of old httpd instances. Yes, I have to fork and exec as I have to call
> some legacy C code and then set up comms between the exec'd process and
> Apache.
>
>
> My first problem comes when loading the server heavily I occasionally see
> an instance that forked properly, but the child never wakes up and runs.

<snip>


See if using Apache::SubProcess helps.

> Lastly, cleanup_for_exec() doesn't seem to work - with tracing on I can see
> that we get into APR::Pool but the return status is always zero. I've
> tried $r->APR::Pool::cleanup_for_exec() and a bald
> &APR::Pool::cleanup_for_exec().
[...]

There is no $r->cleanup_for_exec() in mp2, there is
APR::Pool::cleanup_for_exec(), which accepts no arguments, returns no result
and does:

<snip>

Reply via email to