Attachment "tcl_unix_notify.patch" to
ticket [2417695fff]
added by
a3a3el
2008-12-11 23:54:47.
Index: unix/tclUnixNotfy.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixNotfy.c,v
retrieving revision 1.37
diff -u -r1.37 tclUnixNotfy.c
--- unix/tclUnixNotfy.c 26 Oct 2008 12:45:04 -0000 1.37
+++ unix/tclUnixNotfy.c 11 Dec 2008 16:50:44 -0000
@@ -937,6 +937,12 @@
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.