Mail Archives: cygwin-developers/1998/09/18/11:29:27
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 -