httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Ames <>
Subject Re: [PATCH] log execve() failures
Date Fri, 14 Jul 2000 17:11:33 GMT wrote:
> > >    The best thing I can suggest, is to have ap_create_process wait on
> > > the child process before it returns.
> >
> > Seems kinda complex for a condition that doesn't exist today.
> Okay, so modify mod_cgi[d].  If the child process dies, do a wait in
> there.  This will get us the same error code.
> We cannot write to stderr from within a library.  There are very few
> places where we currently write to stderr in APR:
I researched the wait approach, and IMO the cure is worse than the
disease.  The research was educational for me though :-)  Please correct
me if my reasoning is flawed.

Looks like we would have to change the handling of SIGCHLD so that the
child becomes a zombie briefly, then reap the status via some kind of
wait.  The way the code is partitioned today, it would make the most
sense to change the SIGCHLD handling in APR, and do the wait in either
mod_cgi(d) or util_script.  

Unfortunately that opens up the opportunity for bugs where the app
screws up and doesn't do the wait properly, and we end up leaking zombie
processes :-(  Plus, we would have to do the wait in the mainline path
as well as the error path, which adds a little path length (probably not
much compared to fork).

Let's drop this one for now.  There's a bigger logging issue looming on
the horizon...


View raw message