diff options
author | ferrieux <ferrieux@users.sourceforge.net> | 2012-09-07 14:44:46 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@users.sourceforge.net> | 2012-09-07 14:44:46 (GMT) |
commit | 4596fb2059e8fe8f751eba9ff3949fa9f2545fae (patch) | |
tree | 4e787db7dedfa13ff9af7db6fd3b0cb62d547a3a /unix | |
parent | 5c94189d521507337dc7831ceae34212fadf771b (diff) | |
download | tcl-4596fb2059e8fe8f751eba9ff3949fa9f2545fae.zip tcl-4596fb2059e8fe8f751eba9ff3949fa9f2545fae.tar.gz tcl-4596fb2059e8fe8f751eba9ff3949fa9f2545fae.tar.bz2 |
Backport of 2008-12-12 8.6 commit: Fix missing CLOEXEC on internal pipes [2417695]
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixNotfy.c | 6 |
1 files changed, 6 insertions, 0 deletions
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. |