Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Sun, 25 Mar 2001 12:05:28 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Possible globbing error in bash 2.04.7(2)? Message-ID: <20010325120528.B28108@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4 DOT 3 DOT 1 DOT 2 DOT 20010320152055 DOT 022c8f00 AT pop DOT ma DOT ultranet DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.11i In-Reply-To: <4.3.1.2.20010320152055.022c8f00@pop.ma.ultranet.com>; from lhall@rfk.com on Tue, Mar 20, 2001 at 03:26:00PM -0500 On Tue, Mar 20, 2001 at 03:26:00PM -0500, Larry Hall (RFK Partners, Inc) wrote: >At 03:10 PM 3/20/2001, Brian DOT P DOT Kasper AT aero DOT 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 >>tt 564 $ ls >>(... 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. I can't remember if I already replied to this, but I can't duplicate this either. Sorry. cgf -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple