Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

WHICH /A misbehavior

May
3,515
5
WinXP SP3. I reported on 8/29 that in v10 and in v11 (unlike V9 and earlier)
some of the time WHICH /A first returns the correct results, afterwards it
spews out a bunch of lines reporting the searched for item as an external.
The responses often start with _cwds. Most lines include one of the
environment variables defined before completion of TCSTART, with its value,
including some system level variables. In some instances the response seems
to come from the middle of the global alias table. The situation has not
changed with v11 b21. A sample is below. Note that presence or absence of
plugins does not seem to affect the result.

which is an internal command
which is a batch file : F:\btm\which.btm
which is an external : F:\util\which.exe
which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\bfile=STATE.RST
which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\bs=.\*.h .\*.cb
F:DEV\BRIEF\empire\*.h F:DEV\BRIEF\empire\*.cb F:DEV\BRIEF\brf\*.h
F:DEV\BRIEF\brf\*.cb
which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\CLASSPATH=.;C:Program
Files\QuickTime\QTSystem\QTJava.zip
which is an external : ComSpec=F:\JPSOFT\I11\TCC.EXE
which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\general.set=YES
which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\local_c.set=yes
which is an external :
F:\ACCOUNTS\TDB\IRA_DSTR\PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
which is an external : PROMPT=AC %@if[%_acstatus EQ 1,on,off; Charge:
%_batterypercent%%%]$_$e[0;1;32;40m%_date
$t$e[0;1;37;41mWD10GB$e[0;1;36;40m$e[0;1;33;40m$e[0;1;33;41mTCC$e[1;34;40m11.00.021$e[0;1;33;40mESF$e[0;1;32;40m$_$e[0;1;33;41m$P$e[1;32;40m
which is an external : QTJAVA=C:\Program Files\QuickTime\QTSystem\QTJava.zip
which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\setcolor.set=YES
which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\tp_=acsZ\1084\TCC11.00.021 -
2009.10.01 09.28.44
which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\user_name=Fabian, E.S.
which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\ver=11.00.021
which is an external :
F:\ACCOUNTS\TDB\IRA_DSTR\_CMND_=$e[0;1;37;41mWD10GB$e[0;1;36;40m$e[0;1;33;40m$e[0;1;33;41mTCC$e[1;34;40m11.00.021
which is an external :
F:\ACCOUNTS\TDB\IRA_DSTR\_ipname=facci.hsd1.md.comcast.net.
--
Steve
 
I can reproduce this problem in 11.00.21 by issuing "which /a which"
many times in a row.


TCC 11.00.21 Windows XP [Version 5.1.2600]
TCC Build 21 Windows XP Build 2600 Service Pack 3


On Wed, Oct 7, 2009 at 11:41 AM, Steve Fábián <> wrote:

> WinXP SP3. I reported on 8/29 that in v10 and in v11 (unlike V9 and earlier)
> some of the time WHICH /A first returns the correct results, afterwards it
> spews out a bunch of lines reporting the searched for item as an external.
> The responses often start with _cwds. Most lines include one of the
> environment variables defined before completion of TCSTART, with its value,
> including some system level variables. In some instances the response seems
> to come from the middle of the global alias table. The situation has not
> changed with v11 b21. A sample is below. Note that presence or absence of
> plugins does not seem to affect the result.
>
> which is an internal command
> which is a batch file : F:\btm\which.btm
> which is an external : F:\util\which.exe
> which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\bfile=STATE.RST
> which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\bs=.\*.h .\*.cb
> F:DEV\BRIEF\empire\*.h F:DEV\BRIEF\empire\*.cb F:DEV\BRIEF\brf\*.h
> F:DEV\BRIEF\brf\*.cb
> which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\CLASSPATH=.;C:Program
> Files\QuickTime\QTSystem\QTJava.zip
> which is an external : ComSpec=F:\JPSOFT\I11\TCC.EXE
> which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\general.set=YES
> which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\local_c.set=yes
> which is an external :
> F:\ACCOUNTS\TDB\IRA_DSTR\PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
> which is an external : PROMPT=AC %@if[%_acstatus EQ 1,on,off; Charge:
> %_batterypercent%%%]$_$e[0;1;32;40m%_date
> $t$e[0;1;37;41mWD10GB$e[0;1;36;40m$e[0;1;33;40m$e[0;1;33;41mTCC$e[1;34;40m11.00.021$e[0;1;33;40mESF$e[0;1;32;40m$_$e[0;1;33;41m$P$e[1;32;40m
> which is an external : QTJAVA=C:\Program Files\QuickTime\QTSystem\QTJava.zip
> which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\setcolor.set=YES
> which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\tp_=acsZ\1084\TCC11.00.021 -
> 2009.10.01 09.28.44
> which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\user_name=Fabian, E.S.
> which is an external : F:\ACCOUNTS\TDB\IRA_DSTR\ver=11.00.021
> which is an external :
> F:\ACCOUNTS\TDB\IRA_DSTR\_CMND_=$e[0;1;37;41mWD10GB$e[0;1;36;40m$e[0;1;33;40m$e[0;1;33;41mTCC$e[1;34;40m11.00.021
> which is an external :
> F:\ACCOUNTS\TDB\IRA_DSTR\_ipname=facci.hsd1.md.comcast.net.
> --
> Steve
>
>
>
>
>
>
>



--
Jim Cook
2009 Saturdays: 4/4, 6/6, 8/8, 10/10, 12/12 and 5/9, 9/5, 7/11, 11/7.
Next year they're Sunday.
 
> WinXP SP3. I reported on 8/29 that in v10 and in v11 (unlike V9 and
> earlier)
> some of the time WHICH /A first returns the correct results, afterwards
> it
> spews out a bunch of lines reporting the searched for item as an
> external.
> The responses often start with _cwds. Most lines include one of the
> environment variables defined before completion of TCSTART, with its
> value,
> including some system level variables. In some instances the response
> seems
> to come from the middle of the global alias table. The situation has
> not
> changed with v11 b21. A sample is below. Note that presence or absence
> of plugins does not seem to affect the result.

Still not reproducible here. Do you have a failcase?

Rex Conn
JP Software
 
Not sure what you mean by "many times", but I just tried running it 5,000
times and couldn't reproduce the problem.

I don't see any of the really weird stuff Steve posted but I do see it behave differently each time, often giving (at the end) output for inappropriate files.

Code:
v:\> for /l %i in (1,1,10) ( echo. & echo ITERATION %i & which /a u* | tail /n5)


ITERATION 1
u* is an external : D:\MSTools\acldiag.exe
u* is an external : D:\MSTools\activate.exe
u* is an external : D:\MSTools\addiag.exe
u* is an external : D:\MSTools\apimon.exe
u* is an external : D:\MSTools\apmstat.exe

ITERATION 2
u* is an external : D:\MSTools\acldiag.exe
u* is an external : D:\MSTools\activate.exe
u* is an external : D:\MSTools\addiag.exe
u* is an external : D:\MSTools\apimon.exe
u* is an external : D:\MSTools\apmstat.exe

ITERATION 3
u* is an external : D:\uty\uptimetc.exe
u* is an external : D:\ttk\UNIQ.EXE
u* is an external : D:\ttk\UUDECODE.EXE
u* is an external : D:\ttk\UUENCODE.EXE
u* is an external : G:\VS2008\VC\bin\undname.exe

ITERATION 4
u* is an external : D:\uty\uptimetc.exe
u* is an external : D:\ttk\UNIQ.EXE
u* is an external : D:\ttk\UUDECODE.EXE
u* is an external : D:\ttk\UUENCODE.EXE
u* is an external : G:\VS2008\VC\bin\undname.exe

ITERATION 5
u* is an external : D:\ttk\EXPR.EXE
u* is an external : G:\VS2008\VC\bin\editbin.exe
u* is an external : D:\MSTools\efsinfo.exe
u* is an external : D:\MSTools\exctrlst.exe
u* is an external : D:\MSTools\extract.exe

ITERATION 6
u* is an external : D:\uty\gzip.exe
u* is an external : D:\ttk\GREP.EXE
u* is an external : D:\ttk\greph.exe
u* is an external : D:\MSTools\getsid.exe
u* is an external : D:\MSTools\gflags.exe

ITERATION 7
u* is an external : D:\uty\uptimetc.exe
u* is an external : D:\ttk\UNIQ.EXE
u* is an external : D:\ttk\UUDECODE.EXE
u* is an external : D:\ttk\UUENCODE.EXE
u* is an external : G:\VS2008\VC\bin\undname.exe

ITERATION 8
u* is an external : D:\uty\uptimetc.exe
u* is an external : D:\ttk\UNIQ.EXE
u* is an external : D:\ttk\UUDECODE.EXE
u* is an external : D:\ttk\UUENCODE.EXE
u* is an external : G:\VS2008\VC\bin\undname.exe

ITERATION 9
u* is an external : D:\uty\uptimetc.exe
u* is an external : D:\ttk\UNIQ.EXE
u* is an external : D:\ttk\UUDECODE.EXE
u* is an external : D:\ttk\UUENCODE.EXE
u* is an external : G:\VS2008\VC\bin\undname.exe

ITERATION 10
u* is an external : D:\uty\uptimetc.exe
u* is an external : D:\ttk\UNIQ.EXE
u* is an external : D:\ttk\UUDECODE.EXE
u* is an external : D:\ttk\UUENCODE.EXE
u* is an external : G:\VS2008\VC\bin\undname.exe
Here's another indication that something is amiss.

Code:
v:\> for /l %i in (1,1,10) ( echo. & echo ITERATION %i & which /a u* | wc -l)

ITERATION 1
     50

ITERATION 2
     42

ITERATION 3
     42

ITERATION 4
     23

ITERATION 5
     33

ITERATION 6
     33

ITERATION 7
     23

ITERATION 8
     23

ITERATION 9
     23

ITERATION 10
     23
 
On Wed, 07 Oct 2009 20:41:33 -0500, rconn <> wrote:

|---Quote---
|> I don't see any of the really weird stuff Steve posted but I do see it
|> behave differently each time, often giving (at the end) output for
|> inappropriate files.
|---End Quote---
|Still not reproducible here; I ran your FOR loop 1000 times and get exactly
|the same (correct) results.

Run the FOR loop with just 10 iterations, over and over, manually. It may take
a long time. Use the command below; it's easier to spot a screw-up. Here's one
generated with pristine v11 (/IPS /LA).

v:\> for /l %i in (1,1,10) ( which /a u* | tail /n1 )
u* is an external : G:\VS2008\VC\bin\undname.exe
u* is an external : G:\VS2008\VC\bin\undname.exe
u* is an external : G:\VS2008\VC\bin\undname.exe
u* is an external : G:\VS2008\VC\bin\undname.exe
u* is an external : WATCOM=D:\watcom1.3
u* is an external : G:\VS2008\VC\bin\undname.exe
u* is an external : G:\VS2008\VC\bin\undname.exe
u* is an external : G:\VS2008\VC\bin\undname.exe
u* is an external : V:\.exe
u* is an external : V:\.exe

BTW, there is no "v:\.exe".
--
- Vince
 
On Wed, 07 Oct 2009 21:36:02 -0500, vefatica <> wrote:

|Run the FOR loop with just 10 iterations, over and over, manually. It may take
|a long time. Use the command below; it's easier to spot a screw-up. Here's one
|generated with pristine v11 (/IPS /LA).

In fact it's much more likely to misbehave if you throw in some odd-balls
(nearly every time for me).

v:\> for /l %i in (1,1,10) ( which /a %i* & which /a u* | tail /n1 )
1* is an unknown command
u* is an external : G:\VS2008\VC\bin\undname.exe
2* is an unknown command
u* is an external : G:\VS2008\VC\bin\undname.exe
3* is an unknown command
u* is an external : G:\VS2008\VC\bin\undname.exe
4* is an unknown command
u* is an external : G:\VS2008\VC\bin\undname.exe
5* is an unknown command
u* is an external : G:\VS2008\VC\bin\undname.exe
6* is an unknown command
u* is an external : G:\VS2008\VC\bin\undname.exe
7* is an external : D:\uty\7za.exe
7* is an external : V:\WINDOWS\system32\unlodctr.exe
7* is an external : C:\WINDOWS\system32\upnpcont.exe
7* is an external : C:\WINDOWS\system32\ups.exe
7* is an external : C:\WINDOWS\system32\user.exe
7* is an external : C:\WINDOWS\system32\userinit.exe
7* is an external : C:\WINDOWS\system32\usrmlnka.exe
7* is an external : C:\WINDOWS\system32\usrprbda.exe
7* is an external : C:\WINDOWS\system32\usrshuta.exe
7* is an external : C:\WINDOWS\system32\utilman.exe
7* is a batch file : C:\WINDOWS\system32\usrlogon.cmd
7* is an external : C:\WINDOWS\Updreg.EXE
7* is an external : C:\WINDOWS\System32\Wbem\unsecapp.exe
7* is an external : D:\uty\unzip.exe
7* is an external : D:\uty\unzipsfx.exe
7* is an external : D:\uty\uptime.exe
7* is an external : D:\uty\uptimepc.exe
7* is an external : D:\uty\uptimetc.exe
7* is an external : D:\ttk\UNIQ.EXE
7* is an external : D:\ttk\UUDECODE.EXE
7* is an external : D:\ttk\UUENCODE.EXE
7* is an external : G:\VS2008\VC\bin\undname.exe
u* is an external : G:\VS2008\VC\bin\undname.exe
8* is an unknown command
u* is an external : G:\VS2008\VC\bin\undname.exe
9* is an unknown command
u* is an external : G:\VS2008\VC\bin\undname.exe
10* is an unknown command
u* is an external : G:\VS2008\VC\bin\undname.exe
--
- Vince
 
Here's another. This one screwed up on the 6th try. By the 18th try, it was even screwier. Here's the 18th try.

Code:
v:\> for /l %i in (65,1,74) ( which /a %@CHAR[%i]* | tail /n1 )
A* is an external : D:\MSTools\clonepr.vbs
B* is an external : D:\MSTools\dupfinder.exe
C* is an external : D:\MSTools\clonepr.vbs
D* is an external : D:\MSTools\dupfinder.exe
E* is an external : D:\MSTools\extract.exe
F* is an external : D:\MSTools\clonepr.vbs
G* is an external : D:\MSTools\dupfinder.exe
H* is an external : D:\MSTools\clonepr.vbs
I* is an external : D:\MSTools\dupfinder.exe
J* is an external : D:\MSTools\clonepr.vbs
 
On 2009-10-08 03:10, vefatica wrote:

> I don't see any of the really weird stuff Steve posted but I do see it behave differently each time, often giving (at the end) output for inappropriate files.

I can't reproduce this, no matter how many times I try. Maybe your PATH
or PATHEXT settings have something to do with it? Could you post those,
if they seem relevant, please?
 
On Thu, 08 Oct 2009 01:58:32 -0500, dim <> wrote:

|I can't reproduce this, no matter how many times I try. Maybe your PATH
|or PATHEXT settings have something to do with it? Could you post those,
|if they seem relevant, please?

v:\> path
PATH=D:\watcom1.3\binnt;D:\watcom1.3\binw;D:\Perl\site\bin;D:\Perl\bin;C:\WINDOW
S\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Rox
io Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;d
:\uty;d:\ttk;G:\VS2008\VC\bin;D:\DK7\;D:\MSTools;d:\windump;D:\NetMon3\

v:\> echo %pathext
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
--
- Vince
 
dim:
| I can't reproduce this, no matter how many times I try. Maybe your PATH
| or PATHEXT settings have something to do with it? Could you post those,
| if they seem relevant, please?

Vince:
| Here's another. This one screwed up on the 6th try. By the 18th try, it
was
| even screwier. Here's the 18th try.

Rex:
| Not reproducible here.

All my tests were on WinXP (home) SP3, with TCC only (without using TCMD).
UnicodeOutput=No. Furthermore, during login (as an administrator) a
transient V10 starts SHRALIAS.EXE* and loads all four global tables, and
also runs a small batch file that loads key aliases before quitting. *:
SHRALIAS.EXE is the special version from Vince, which saves the tables in
ASCII., not a version ever distributed by JPsoft.

The desktop shortcuts which start V9, V10 and V11 explicitly specify the
same .INI file, which in turn specifies the same TCSTART. The only
version-based variation is used to change the color in which the prompt
displays the version, thus PATH, PATHEXT, etc. are all identical in V9, V10
and V11. I do get .INI error messages in V9 from a few new .INI directives
that V10 or V11 inserted when the .INI files were temporarily not read-only.

Vince, Rex: did you do your tests on WinXP?

WHICH /A always reports the correct information in V9, V10 and V11 usually
have junk. On my system even repeated WHICH/A after a fresh start of TCC 10
or 11 rarely, if ever, produces junk. I need to do some other things, e.g.,
change directories, before the problem shows.
--
Steve
 
On Thu, 08 Oct 2009 08:29:33 -0500, Steve Fábián <> wrote:

|Vince, Rex: did you do your tests on WinXP?

All my testing was on XP SP3.
--
- Vince
 
Back
Top