apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bjoern A. Zeeb" <bzeeb-li...@lists.zabbadoz.net>
Subject Re: [PATCH] inheriting pipes
Date Wed, 05 Mar 2003 22:02:08 GMT
On Wed, 5 Mar 2003, Joe Orton wrote:

> On Wed, Mar 05, 2003 at 08:03:51PM +0100, Christian Kratzer wrote:
> > Hi,
> >
> > On Wed, 5 Mar 2003, Joe Orton wrote:
> > >
> > > +    (*in)->flags = (*out)->flags = APR_INHERIT;
> >
> 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.

That's true. But please move the assigment up to the others just for
consistency (#include "inherit.h" left out of patch):

--- ./pipe.c.orig	Wed Mar  5 21:46:13 2003
+++ ./pipe.c	Wed Mar  5 21:49:13 2003
@@ -204,6 +204,7 @@
     (*in)->filedes = filedes[0];
     (*in)->is_pipe = 1;
     (*in)->fname = NULL;
+    (*in)->flags = APR_INHERIT;
     (*in)->buffered = 0;
     (*in)->blocking = BLK_ON;
     (*in)->timeout = -1;
@@ -217,6 +218,7 @@
     (*out)->filedes = filedes[1];
     (*out)->is_pipe = 1;
     (*out)->fname = NULL;
+    (*out)->flags = APR_INHERIT;
     (*out)->buffered = 0;
     (*out)->blocking = BLK_ON;
     (*out)->timeout = -1;

-- 
Greetings

Bjoern A. Zeeb				bzeeb at Zabbadoz dot NeT
56 69 73 69 74				http://www.zabbadoz.net/

Mime
View raw message