httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Re: [PATCH] Race condition with CGI reaping under Solaris
Date Tue, 18 Mar 2003 20:11:35 GMT
On Tue, Mar 18, 2003 at 12:55:52PM -0500, Bill Stoddard wrote:
> This patch was committed to 1.3.28-dev about 4 months ago (gee, has it 
> really been 4+ months since a 1.3. release?)
> 
> http://cvs.apache.org/viewcvs.cgi/apache-1.3/src/main/alloc.c.diff?r1=1.128&r2=1.129

Thank you. I never thought to check CVS - it seems to me too like 1.3.27 was
a recent release :-)

That patch is not quite the same as mine, as it still sends a SIGTERM
immediately. I guess any application with a clean-up phase will have to
catch SIGTERM if it wants to be sure of having a chance to finish its job;
although if it's just the tail end of a C runtime environment finishing off
then it probably doesn't matter.

One other comment: I note that the loop which monitors for process status
uses waitpid(...WNOHANG). But the first bit of code which checks the process
status is wrapped inside

#ifndef NEED_WAITPID
...
#endif

So I just wonder, if waitpid() is safe to use in the second part, why the
first part needs to be #ifndef'd out in this way?

Regards,

Brian.

Mime
View raw message