diff options
author | ferrieux <ferrieux@users.sourceforge.net> | 2008-12-12 16:07:17 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@users.sourceforge.net> | 2008-12-12 16:07:17 (GMT) |
commit | 93b82f20898aee2279608c81083e429192114e7a (patch) | |
tree | 30fb8730c825bdf2fb1362e6bcad9fae1974934b /unix/tclUnixPipe.c | |
parent | 6ebb11823238d9bf5e8b20524bacc6c72450693f (diff) | |
download | tcl-93b82f20898aee2279608c81083e429192114e7a.zip tcl-93b82f20898aee2279608c81083e429192114e7a.tar.gz tcl-93b82f20898aee2279608c81083e429192114e7a.tar.bz2 |
Fix missing CLOEXEC on internal pipes [2417695] and [chan pipe] fds.
Diffstat (limited to 'unix/tclUnixPipe.c')
-rw-r--r-- | unix/tclUnixPipe.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index a243889..967d633 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixPipe.c,v 1.44 2008/07/21 21:46:47 das Exp $ + * RCS: @(#) $Id: tclUnixPipe.c,v 1.45 2008/12/12 16:07:18 ferrieux Exp $ */ #include "tclInt.h" @@ -798,6 +798,9 @@ Tcl_CreatePipe( return TCL_ERROR; } + fcntl(fileNums[0], F_SETFD, FD_CLOEXEC); + fcntl(fileNums[1], F_SETFD, FD_CLOEXEC); + *rchan = Tcl_MakeFileChannel((ClientData) INT2PTR(fileNums[0]), TCL_READABLE); Tcl_RegisterChannel(interp, *rchan); |