summaryrefslogtreecommitdiffstats
path: root/win/tclWinChan.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinChan.c')
-rw-r--r--win/tclWinChan.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c
index e2126fb..254a24c 100644
--- a/win/tclWinChan.c
+++ b/win/tclWinChan.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinChan.c,v 1.6 1999/04/16 00:48:07 stanton Exp $
+ * RCS: @(#) $Id: tclWinChan.c,v 1.6.2.1 1999/05/18 17:38:29 redman Exp $
*/
#include "tclWinInt.h"
@@ -811,13 +811,22 @@ TclpOpenFileChannel(interp, fileName, modeString, permissions)
}
channel = TclpCreateCommandChannel(readFile, writeFile, NULL, 0, NULL);
break;
- case FILE_TYPE_CHAR:
- default:
+ case FILE_TYPE_DISK:
channel = TclWinOpenFileChannel(handle, channelName,
channelPermissions,
(mode & O_APPEND) ? FILE_APPEND : 0);
break;
+ case FILE_TYPE_CHAR:
+ default:
+ /*
+ * The handle is of an unknown type, probably /dev/nul equivalent
+ * or possibly a closed handle. Don't use it, otherwise Tk runs into
+ * trouble with the MS DevStudio debugger.
+ */
+
+ channel = NULL;
+ break;
}
Tcl_DStringFree(&buffer);