apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Kratzer ...@cksoft.de>
Subject Re: [PATCH] inheriting pipes
Date Wed, 05 Mar 2003 20:10:31 GMT
Hi,

On Wed, 5 Mar 2003, Joe Orton wrote:
[snipp]
> The APR_INHERIT flag needs to be set, since the current code does allow
> pipes to be inherited by default.  If the APR_INHERIT flag is not set,
> apr_file_inherit_unset has no effect.  To answer Bill's question as
> well, flags is zero at this point in the function, so a bitop is not
> need, just an assignment.

ok.

> > But why not just register apr_unix_file_cleanup for cleanup like in
>
> Indeed, I wonder it was implement this way too.  I think the change you
> suggest is a little more intrusive than mine, as currently some callers
> are compensating for the fact that no child_cleanup is registered.

perhaps we can get the opion on some apr developers on this. Imho its
better to spend longer time finding the solution most natural to apr
than finding some hack that achieves the same affect.

I am new to apr myself having looked at it for the first time while
tracing the open file descriptors in apache.

> I also wonder why the code goes to these lengths when on Unix setting
> the CLOEXEC flag would probably suffice.

It looks like apr is trying to emulate CLOEXEC behaviour by calling
the cleanup function in apr_pool_cleanup_for_exec().

This could be so because apr does not expect CLOEXEC to be available
on every platform.

Greetings
Christian

-- 
CK Software GmbH
Christian Kratzer,         Schwarzwaldstr. 31, 71131 Jettingen
Email: ck@cksoft.de
Phone: +49 7452 889-135    Open Software Solutions, Network Security
Fax:   +49 7452 889-136    FreeBSD spoken here!


Mime
View raw message