summaryrefslogtreecommitdiffstats
path: root/win/tclWinSerial.c
diff options
context:
space:
mode:
authormdejong <mdejong@noemail.net>2002-11-07 02:13:35 (GMT)
committermdejong <mdejong@noemail.net>2002-11-07 02:13:35 (GMT)
commit5eaa499a632bc6ecd456ac1faa409fdef624e070 (patch)
treef86db515375673b4202dbd6719d7bd881da96117 /win/tclWinSerial.c
parentfdd7933bc7031a5752f663bb798bce3332d4444f (diff)
downloadtcl-5eaa499a632bc6ecd456ac1faa409fdef624e070.zip
tcl-5eaa499a632bc6ecd456ac1faa409fdef624e070.tar.gz
tcl-5eaa499a632bc6ecd456ac1faa409fdef624e070.tar.bz2
* generic/tclEvent.c (TclInExit, TclInThreadExit):
Split out functionality of TclInExit to make it clear which one should be called in each situation. * generic/tclInt.decls: Declare TclInThreadExit. * generic/tclIntDecls.h: Regen. * generic/tclStubInit.c: Regen. * mac/tclMacChan.c (StdIOClose): * unix/tclUnixChan.c (FileCloseProc): * win/tclWinChan.c (FileCloseProc): * win/tclWinConsole.c (ConsoleCloseProc): * win/tclWinPipe.c (TclpCloseFile): * win/tclWinSerial.c (SerialCloseProc): Invoke the new TclInThreadExit method instead of TclInExit. FossilOrigin-Name: de2cfbf168c353f2de6ec6db06bfb347b0ce9640
Diffstat (limited to 'win/tclWinSerial.c')
-rw-r--r--win/tclWinSerial.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c
index e5e69fa..a1cdcfd 100644
--- a/win/tclWinSerial.c
+++ b/win/tclWinSerial.c
@@ -11,7 +11,7 @@
*
* Serial functionality implemented by Rolf.Schroedter@dlr.de
*
- * RCS: @(#) $Id: tclWinSerial.c,v 1.21 2002/07/19 13:59:10 dkf Exp $
+ * RCS: @(#) $Id: tclWinSerial.c,v 1.22 2002/11/07 02:13:37 mdejong Exp $
*/
#include "tclWinInt.h"
@@ -632,11 +632,11 @@ SerialCloseProc(
/*
* Don't close the Win32 handle if the handle is a standard channel
- * during the exit process. Otherwise, one thread may kill the stdio
- * of another.
+ * during the thread exit process. Otherwise, one thread may kill
+ * the stdio of another.
*/
- if (!TclInExit()
+ if (!TclInThreadExit()
|| ((GetStdHandle(STD_INPUT_HANDLE) != serialPtr->handle)
&& (GetStdHandle(STD_OUTPUT_HANDLE) != serialPtr->handle)
&& (GetStdHandle(STD_ERROR_HANDLE) != serialPtr->handle))) {