www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/09/18/11:29:27

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
To: Sergey Okhapkin <sos AT prospect DOT com DOT ru>,
"'cygwin32-developers AT cygnus DOT com'" <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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019