From 69d1bdb95ef90f112d06b7ece0d6db57c504a030 Mon Sep 17 00:00:00 2001 From: sebres Date: Wed, 12 Apr 2017 14:52:10 +0000 Subject: [win] fixes "wrong" checking of the flag TCL_CLOSE_READ in close2proc (using mask) --- win/tclWinPipe.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 87ce790..d303f8f 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -1804,7 +1804,7 @@ PipeClose2Proc( errorCode = 0; result = 0; - if ((!flags || flags == TCL_CLOSE_READ) && (pipePtr->readFile != NULL)) { + if ((!flags || flags & TCL_CLOSE_READ) && (pipePtr->readFile != NULL)) { /* * Clean up the background thread if necessary. Note that this must be * done before we can close the file, since the thread may be blocking @@ -1824,8 +1824,7 @@ PipeClose2Proc( pipePtr->validMask &= ~TCL_READABLE; pipePtr->readFile = NULL; } - if ((!flags || flags & TCL_CLOSE_WRITE) - && (pipePtr->writeFile != NULL)) { + if ((!flags || flags & TCL_CLOSE_WRITE) && (pipePtr->writeFile != NULL)) { if (pipePtr->writeThread) { /* -- cgit v0.12