This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Possible globbing error in bash 2.04.7(2)?


At 03:10 PM 3/20/2001, Brian.P.Kasper@aero.org wrote:
>Unfortunately, the problems seem to be intermittant, but I have
>developed a test script which will demonstrate problem 2 on my
>system:
>
>#!/bin/bash
>
>declare -i a=0
>
>while [ $a -lt 1000 ]; do
>   let a=$a+1
>   echo > tt/$a
>   if ls tt/* > /dev/null
>   then
>     echo $a OK
>   else
>     echo $a Failed
>   fi
>done


You forgot to add "mkdir tt"!:-)


>The output of this script looks like
>
>1 OK
>2 OK
>3 OK
>4 OK
>5 OK
>
>until ...
>
>509 OK
>510 OK
>511 Failed
>512 OK
>513 OK
>
>The failures become more frequent from then on.  I aborted the script
>when i = 836; up to that point, I had experienced 45 failures.  At the
>times when the failures were really frequent, there appeared to be a
>pattern in which alternate attempts failed, but this was not always true.
>
>I believe the problem lies with the way in which bash globs the
>command line, because 'ls *' fails when 'ls' succeeds:
>
>tmp 563 $ cd tt<cr>
>tt 564 $ ls<cr>
>(... file listing displayed ...)
>tt 565 $ ls *
>   63930 [main] bash 297 handle_exceptions: Exception:
>STATUS_ACCESS_VIOLATION
>   65716 [main] bash 297 stackdump: Dumping stack trace to ls.exe.stackdump
>Segmentation fault (core dumped)
>tt 566 $

Hm, this works for me using:

GNU bash, version 2.04.7(2)-release (i686-pc-cygwin)
and
1.1.8(0.34/3/2) 2001-01-31 10:08 i686 unknown

I ran it until i = 836 like you did without a problem.  It did slow down 
significantly though (observed guess of a factor of 2).  Maybe the issue
you're noticing is actually a Cygwin problem.


Larry


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]