summaryrefslogtreecommitdiffstats
path: root/win/tclWinPipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinPipe.c')
-rw-r--r--win/tclWinPipe.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index a859c8c..ab00b0f 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.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: tclWinPipe.c,v 1.85 2010/10/12 10:21:55 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinPipe.c,v 1.86 2011/01/25 22:33:56 nijtmans Exp $
*/
#include "tclWinInt.h"
@@ -1574,7 +1574,6 @@ TclpCreateCommandChannel(
Tcl_Pid *pidPtr) /* An array of process identifiers. */
{
char channelName[16 + TCL_INTEGER_SPACE];
- int channelId;
DWORD id;
PipeInfo *infoPtr = (PipeInfo *) ckalloc((unsigned) sizeof(PipeInfo));
@@ -1593,20 +1592,6 @@ TclpCreateCommandChannel(
infoPtr->writeError = 0;
infoPtr->channel = NULL;
- /*
- * Use one of the fds associated with the channel as the channel id.
- */
-
- if (readFile) {
- channelId = (int) ((WinFile *) readFile)->handle;
- } else if (writeFile) {
- channelId = (int) ((WinFile *) writeFile)->handle;
- } else if (errorFile) {
- channelId = (int) ((WinFile *) errorFile)->handle;
- } else {
- channelId = 0;
- }
-
infoPtr->validMask = 0;
infoPtr->threadId = Tcl_GetCurrentThread();
@@ -1647,7 +1632,7 @@ TclpCreateCommandChannel(
* unique, in case channels share handles (stdin/stdout).
*/
- wsprintfA(channelName, "file%lx", infoPtr);
+ sprintf(channelName, "file%Ix", (size_t) infoPtr);
infoPtr->channel = Tcl_CreateChannel(&pipeChannelType, channelName,
infoPtr, infoPtr->validMask);