summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-03-02 15:29:48 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-03-02 15:29:48 (GMT)
commitfa311630abcb2439d3c9701efbfc94ad0041d86d (patch)
tree97d44a37f390fb234fdbd6e74ae09564956d141c /generic
parent8815f9f3c32c06e9f2d1d2b8ea69e1810988c5a4 (diff)
downloadtcl-fa311630abcb2439d3c9701efbfc94ad0041d86d.zip
tcl-fa311630abcb2439d3c9701efbfc94ad0041d86d.tar.gz
tcl-fa311630abcb2439d3c9701efbfc94ad0041d86d.tar.bz2
[bbc304f61a] Proposed fix for reflected watch race condition.bug_bbc304f61a
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIORChan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/generic/tclIORChan.c b/generic/tclIORChan.c
index 21c766e..9c79f5f 100644
--- a/generic/tclIORChan.c
+++ b/generic/tclIORChan.c
@@ -1609,7 +1609,7 @@ ReflectWatch(
return;
}
- rcPtr->interest = mask;
+// rcPtr->interest = mask;
/*
* Are we in the correct thread?
@@ -1633,6 +1633,7 @@ ReflectWatch(
Tcl_Preserve(rcPtr);
+ rcPtr->interest = mask;
maskObj = DecodeEventMask(mask);
/* assert maskObj.refCount == 1 */
(void) InvokeTclMethod(rcPtr, METH_WATCH, maskObj, NULL, NULL);
@@ -3083,6 +3084,7 @@ ForwardProc(
/* assert maskObj.refCount == 1 */
Tcl_Preserve(rcPtr);
+ rcPtr->interest = paramPtr->watch.mask;
(void) InvokeTclMethod(rcPtr, METH_WATCH, maskObj, NULL, NULL);
Tcl_DecrRefCount(maskObj);
Tcl_Release(rcPtr);