zsh hangs with "command not found" (Peter A. Castro?)
Thorsten Kampe
thorsten@thorstenkampe.de
Sun Sep 12 15:36:00 GMT 2004
* Thorsten Kampe (2004-09-12 16:59 +0200)
> This is a follow-up to the thread "zsh 4.1.1-3 on W2000 hangs with
> command not found" from March 2004.
>
> Facts:
> Cygwin 1.5.12s(0.116/4/2) 20040907 00:06:12
> zsh 4.2.0
> Windows XP SP2
>
> Problem:
> zsh "hangs" about ten seconds when I try to execute a nonexistant
> command (bash in comparison returns immediately).
>
> Even unsetting all environment variables inherited from Windows and
> deleting my .zshrc didn't make any difference.
>
> Changes to march:
> Specifying an absolute path ('/bin/foobar') and unsetting 'correct'
> and 'correctall' make no difference anymore.
>
> * Now I tried to analyze my problem with "File Monitor" from
> SysInternals. I captured two filtered sessions: one with zsh executing
> "foozsh" and one with bash executing "foobash" (both attached).
>
> Things I noticed:
> bash queries 88 items while zsh queries 123. This shouldn't explain
> the ten second difference.
>
> zsh spawns a new instance/process of zsh (pid 224) on line 29! Until
> this line the query results show up with no delay in "File Monitor".
> The next 98 lines show up with the ten second delay.
>
> So either the starting of a new zsh instance/process is so terribly
> slow or the new zsh process searches (for whatever reason) much much
> slower than the first one.
I've examined the output further: it's in fact the creation of a new
process that takes the time. Compare these two snippets (one with
difference time and one with absolute clock time):
27 0.00002486 zsh.exe:3496 FASTIO_QUERY_OPEN C:\foozsh.exe.lnk FILE NOT FOUND Attributes: Error
28 0.00002403 zsh.exe:3496 FASTIO_QUERY_OPEN C:\foozsh.lnk FILE NOT FOUND Attributes: Error
29 0.00010951 zsh.exe:224 FASTIO_QUERY_OPEN C:\cygwin\usr\local\bin\foozsh.exe FILE NOT FOUND Attributes: Error
30 0.00002486 zsh.exe:224 FASTIO_QUERY_OPEN C:\cygwin\usr\local\bin\foozsh FILE NOT FOUND Attributes: Error
31 0.00002570 zsh.exe:224 FASTIO_QUERY_OPEN C:\cygwin\usr\local\bin\foozsh.exe.lnk FILE NOT FOUND Attributes: Error
23 17:24:38 zsh.exe:2360 QUERY INFORMATION C:\cygwin\home\thorsten\whereever.exe.lnk FILE NOT FOUND Attributes: Error
24 17:24:38 zsh.exe:2360 QUERY INFORMATION C:\cygwin\home\thorsten\whereever.lnk FILE NOT FOUND Attributes: Error
25 17:24:49 zsh.exe:2360 QUERY INFORMATION C:\whereever FILE NOT FOUND Attributes: Error
26 17:24:49 zsh.exe:2360 QUERY INFORMATION C:\whereever.exe FILE NOT FOUND Attributes: Error
27 17:24:49 zsh.exe:2360 QUERY INFORMATION C:\whereever.exe.lnk FILE NOT FOUND Attributes: Error
28 17:24:49 zsh.exe:2360 QUERY INFORMATION C:\whereever.lnk FILE NOT FOUND Attributes: Error
29 17:24:49 zsh.exe:2764 QUERY INFORMATION C:\cygwin\usr\local\bin\whereever.exe FILE NOT FOUND Attributes: Error
30 17:24:49 zsh.exe:2764 QUERY INFORMATION C:\cygwin\usr\local\bin\whereever FILE NOT FOUND Attributes: Error
Interestingly File Monitor shows the delay always between line 28 and
29 when set to differential time (which is exactly the creation of a
new process) and between line 24 and 25 when set to "clock time"
(maybe a bug?)
Thorsten
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list