diff options
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixFile.c | 5 | ||||
-rw-r--r-- | unix/tclUnixTest.c | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index db8e5b6..e0f5cf5 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.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: tclUnixFile.c,v 1.39 2004/04/06 22:25:57 dgp Exp $ + * RCS: @(#) $Id: tclUnixFile.c,v 1.40 2004/06/18 20:38:02 dgp Exp $ */ #include "tclInt.h" @@ -54,9 +54,10 @@ TclpFindExecutable(argv0) if (argv0 == NULL) { return NULL; } - if (tclNativeExecutableName != NULL) { + if (tclFindExecutableSearchDone) { return tclNativeExecutableName; } + tclFindExecutableSearchDone = 1; Tcl_DStringInit(&buffer); diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index f3414f5..955f719 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.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: tclUnixTest.c,v 1.17 2004/05/27 13:18:55 dkf Exp $ + * RCS: @(#) $Id: tclUnixTest.c,v 1.18 2004/06/18 20:38:02 dgp Exp $ */ #include "tclInt.h" @@ -446,6 +446,7 @@ TestfindexecutableCmd(clientData, interp, argc, argv) { char *oldName; char *oldNativeName; + int oldDone; if (argc != 2) { Tcl_AppendResult(interp, "wrong # arguments: should be \"", argv[0], @@ -455,9 +456,11 @@ TestfindexecutableCmd(clientData, interp, argc, argv) oldName = tclExecutableName; oldNativeName = tclNativeExecutableName; + oldDone = tclFindExecutableSearchDone; tclExecutableName = NULL; tclNativeExecutableName = NULL; + tclFindExecutableSearchDone = 0; Tcl_FindExecutable(argv[1]); if (tclExecutableName != NULL) { @@ -468,8 +471,9 @@ TestfindexecutableCmd(clientData, interp, argc, argv) ckfree(tclNativeExecutableName); } - tclExecutableName = oldName; - tclNativeExecutableName = oldNativeName; + tclExecutableName = oldName; + tclNativeExecutableName = oldNativeName; + tclFindExecutableSearchDone = oldDone; return TCL_OK; } |