diff options
author | sebres <sebres@users.sourceforge.net> | 2017-04-12 14:52:10 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2017-04-12 14:52:10 (GMT) |
commit | 69d1bdb95ef90f112d06b7ece0d6db57c504a030 (patch) | |
tree | d1c81fe7c51295a7203db1e158fba776b386a9e0 /win/tclWinPipe.c | |
parent | 6036d8d124dfbfeb4a6727e69997b6a8fab4d7a5 (diff) | |
download | tcl-69d1bdb95ef90f112d06b7ece0d6db57c504a030.zip tcl-69d1bdb95ef90f112d06b7ece0d6db57c504a030.tar.gz tcl-69d1bdb95ef90f112d06b7ece0d6db57c504a030.tar.bz2 |
[win] fixes "wrong" checking of the flag TCL_CLOSE_READ in close2proc (using mask)
Diffstat (limited to 'win/tclWinPipe.c')
-rw-r--r-- | win/tclWinPipe.c | 5 |
1 files 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) { /* |