Diff
Not logged in

Differences From Artifact [8009e0719c]:

To Artifact [6ff0c59081]:


1
2
3
4
5
6
7
8
9
10
11
12

13
14
15
16
17
18
19
1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
19











-
+







/* 
 * tclWinPipe.c --
 *
 *	This file implements the Windows-specific exec pipeline functions,
 *	the "pipe" channel driver, and the "pid" Tcl command.
 *
 * Copyright (c) 1996-1997 by Sun Microsystems, Inc.
 *
 * 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.52 2004/11/30 19:34:52 dgp Exp $
 * RCS: @(#) $Id: tclWinPipe.c,v 1.53 2004/12/01 23:18:55 dgp Exp $
 */

#include "tclWinInt.h"

#include <fcntl.h>
#include <io.h>
#include <sys/stat.h>
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218

1219
1220
1221
1222
1223
1224
1225
1207
1208
1209
1210
1211
1212
1213





1214
1215
1216
1217
1218
1219
1220
1221







-
-
-
-
-
+







	    {
		Tcl_Obj *tclExePtr, *pipeDllPtr;
		int i, fileExists;
		char *start,*end;
		Tcl_DString pipeDll;
		Tcl_DStringInit(&pipeDll);
		Tcl_DStringAppend(&pipeDll, TCL_PIPE_DLL, -1);

		/* For safety, just in case the app didn't call it first */
		Tcl_FindExecutable(NULL);

		tclExePtr = Tcl_NewStringObj(Tcl_GetNameOfExecutable(), -1);
		tclExePtr = TclGetObjNameOfExecutable();
		start = Tcl_GetStringFromObj(tclExePtr, &i);
		for (end = start + (i-1); end > start; end--) {
		    if (*end == '/') {
		        break;
		    }
		}
		if (*end != '/') {