Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 37958 invoked by uid 500); 5 Mar 2003 22:04:11 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Delivered-To: moderator for dev@apr.apache.org Received: (qmail 97163 invoked from network); 5 Mar 2003 20:10:30 -0000 Date: Wed, 5 Mar 2003 21:10:31 +0100 (CET) From: Christian Kratzer To: Joe Orton Cc: dev@apr.apache.org Subject: Re: [PATCH] inheriting pipes In-Reply-To: <20030305195401.GA23514@redhat.com> Message-ID: <20030305205642.T45028-100000@majakka.cksoft.de> X-Spammer-Kill-Ratio: 75% MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS snapshot-20020300-cksoft-02bz on majakka.cksoft.de X-Virus-Scanned: by AMaViS snapshot-20020300 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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!