From: cgf AT cygnus DOT com (Christopher Faylor) Subject: Re: pipe.cc fix 18 Sep 1998 11:29:27 -0700 Message-ID: <19980918140443.E23538.cygnus.cygwin32.developers@cygnus.com> References: <01BDE331 DOT 9F81F9C0 AT sos> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: Sergey Okhapkin , "'cygwin32-developers AT cygnus DOT com'" On Fri, Sep 18, 1998 at 06:24:50PM +0400, Sergey Okhapkin wrote: >pipe.cc (make_pipe): set close-on-exec flag for non-inheritable pipes. > >--- pipe.cc.orig Fri Sep 11 10:15:23 1998 >+++ pipe.cc Fri Sep 18 15:56:33 1998 >@@ -37,6 +37,11 @@ make_pipe (int fildes[2], unsigned int p > int binmode = !!(mode & O_BINARY); > fhr->init (r, binmode, GENERIC_READ); > fhw->init (w, binmode, GENERIC_WRITE); >+ if (mode & O_NOINHERIT) >+ { >+ fhr->set_close_on_exec_flag (1); >+ fhw->set_close_on_exec_flag (1); >+ } > > fildes[0] = fdr; > fildes[1] = fdw; Applied. Thanks. -- cgf AT cygnus DOT com http://www.cygnus.com/