httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: [PATCH] fix fd leaks
Date Fri, 07 Mar 2003 14:54:51 GMT
On Thu, Mar 06, 2003 at 05:33:39PM +0000, Bjoern A. Zeeb wrote:
> On Thu, 6 Mar 2003, Joe Orton wrote:
> 
> Hi,
> 
> > Submitted by: Christian Kratzer, Bjoern A. Zeeb
> >
> ...
> > -
> > -        apr_file_inherit_set(s->error_log);
> >      }
> 
>
> so now we are back to that point that needs further discussing.
> 
> Should we simply remove apr_file_inherit_set or explicitly call
> apr_file_unset_inherit ? Simply removing works as long as defaults in
> APR remain but there is still p.ex.:
> 	if (!(flag & APR_FILE_NOCLEANUP)){
> that can again prevent the child_cleanup_fn from being set (seems to
> unused in open at the moment).
> 
> It seems to me that the apr_file_inherit_set had been in because up
> to including httpd 2.0.39 a bug in apr prevented _set/_unset from
> working as expected (the 2^24 vs. 2<<24 flag check).
> Thus _set did the correct thing that _unset should have done.
> If the _sets had been in for some specific reason we sould perhaps
> use _unset.
> So there needs to be further tracking on why the _sets had been
> committed to apache code.

AFAICT they were added in the commit I referenced, under the guise of
the APR_INHERIT flag to apr_file_open, before the _inherit_set/unset API 
was introduced:

http://marc.theaimsgroup.com/?l=apache-cvs&m=99531770520998&w=2

the comment being simply that it was "obvious" that these fds should be
inherited.  Maybe Bill Rowe can elucidate on that, but I suspect it was
just a mistake.

Regards,

joe

Mime
View raw message