Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Authentication-Warning: erasmus.inf.ed.ac.uk: ht set sender to ht AT inf DOT ed DOT ac DOT uk using -f To: cygwin AT cygwin DOT com Subject: Re: echo vs. ls race condition? References: From: ht AT inf DOT ed DOT ac DOT uk (Henry S. Thompson) Date: Thu, 27 May 2004 10:32:59 +0100 In-Reply-To: (Fred Kulack's message of "Tue, 25 May 2004 09:16:47 -0500") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Note-from-DJ: This may be spam Fred Kulack writes: > Interesting tests. I still can't get it to fail... Note _I_ can't get it to fail with only 10 subdirs -- 100 or 200 are much more reliable at producing the problem. . . > What terminal are you using? Perhaps there's something weird going on with > flow control as descriptors are dup'd for the utilities there? > I'm using plain old winblows console. I can reproduce using windows console plus bash > Did you try the regular echo instead of the builtin? It may have different > characteristics > with regard to this. OK, so _that's_ interesting -- using /bin/echo _and_ running under windows console I _cannot_ reproduce. Either running under rxvt _or_ using builtin echo produces the problem. Also, using /bin/sh to run the loop does _not_ reproduce the problem, even with builtin echo. Here's a hack way to test for the bug automatically, by the way: > command ls -d * | while read d; do /bin/echo -e "\n-$d-"; ls $d ; done > xxx > egrep -A2 'aaa' xxx| tr -d '\012' | sed 's/--/\ /g' | egrep 'aaa.*aaa' > uname -a CYGWIN_NT-5.1 francis 1.5.9(0.112/4/2) 2004-03-18 23:05 i686 unknown unknown Cygwin > cygcheck -cd bash Cygwin Package Information Package Version bash 2.05b-16 ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht AT inf DOT ed DOT ac DOT uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam] -- 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/