diff options
author | ferrieux@users.sourceforge.net <ferrieux> | 2008-12-12 16:07:17 (GMT) |
---|---|---|
committer | ferrieux@users.sourceforge.net <ferrieux> | 2008-12-12 16:07:17 (GMT) |
commit | f90016ba6536f5e2ca6c8fd0aeca05ebbd5ea7b2 (patch) | |
tree | 30fb8730c825bdf2fb1362e6bcad9fae1974934b /unix/tclUnixNotfy.c | |
parent | bee363e2fb1d7837c17c6f77a1aefd76e71aadb5 (diff) | |
download | tcl-f90016ba6536f5e2ca6c8fd0aeca05ebbd5ea7b2.zip tcl-f90016ba6536f5e2ca6c8fd0aeca05ebbd5ea7b2.tar.gz tcl-f90016ba6536f5e2ca6c8fd0aeca05ebbd5ea7b2.tar.bz2 |
Fix missing CLOEXEC on internal pipes [2417695] and [chan pipe] fds.
Diffstat (limited to 'unix/tclUnixNotfy.c')
-rw-r--r-- | unix/tclUnixNotfy.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index eae0ee9..434ae84 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.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: tclUnixNotfy.c,v 1.37 2008/10/26 12:45:04 dkf Exp $ + * RCS: @(#) $Id: tclUnixNotfy.c,v 1.38 2008/12/12 16:07:18 ferrieux Exp $ */ #include "tclInt.h" @@ -937,6 +937,12 @@ NotifierThreadProc( if (TclUnixSetBlockingMode(fds[1], TCL_MODE_NONBLOCKING) < 0) { Tcl_Panic("NotifierThreadProc: could not make trigger pipe non blocking"); } + if (fcntl(receivePipe, F_SETFD, FD_CLOEXEC) < 0) { + Tcl_Panic("NotifierThreadProc: could not make receive pipe close-on-exec"); + } + if (fcntl(fds[1], F_SETFD, FD_CLOEXEC) < 0) { + Tcl_Panic("NotifierThreadProc: could not make trigger pipe close-on-exec"); + } /* * Install the write end of the pipe into the global variable. |