diff options
author | ferrieux <ferrieux@noemail.net> | 2012-09-07 14:44:46 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@noemail.net> | 2012-09-07 14:44:46 (GMT) |
commit | 7bc36aa89bb0bb17a14982599271d2f7b7cc6706 (patch) | |
tree | 4e787db7dedfa13ff9af7db6fd3b0cb62d547a3a | |
parent | 8a183f883e53f34be517210fb2a7ff39df1f0625 (diff) | |
download | tcl-7bc36aa89bb0bb17a14982599271d2f7b7cc6706.zip tcl-7bc36aa89bb0bb17a14982599271d2f7b7cc6706.tar.gz tcl-7bc36aa89bb0bb17a14982599271d2f7b7cc6706.tar.bz2 |
Backport of 2008-12-12 8.6 commit: Fix missing CLOEXEC on internal pipes [2417695]
FossilOrigin-Name: 662a69f5717d6aa13d99472833d0dc01071db744
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | unix/tclUnixNotfy.c | 6 | ||||
-rwxr-xr-x[-rw-r--r--] | win/buildall.vc.bat | 0 |
3 files changed, 11 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2012-09-07 Alexandre Ferrieux <ferrieux@users.sourceforge.net> + + * unix/tclUnixNotfy.c Backport of 2008-12-12 8.6 commit: Fix + missing CLOEXEC on internal pipes [2417695] + 2012-08-25 Donal K. Fellows <dkf@users.sf.net> * library/msgs/uk.msg: [Bug 3561330]: Use the correct full name of diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index 42cc7be..51f0b1f 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -1057,6 +1057,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. diff --git a/win/buildall.vc.bat b/win/buildall.vc.bat index 0c9b3ac..0c9b3ac 100644..100755 --- a/win/buildall.vc.bat +++ b/win/buildall.vc.bat |