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 Message-Id: <5.1.0.14.2.20020402082214.024e3360@pop3.cris.com> X-Sender: rrschulz AT pop3 DOT cris DOT com Date: Tue, 02 Apr 2002 08:33:38 -0800 To: "Larry Hall (RFK Partners, Inc)" , Stuart Brady , Cygwin From: Randall R Schulz Subject: Re: Bash bug? - piped loops using builtin echo and stdout In-Reply-To: <4.3.1.2.20020402110914.02666ee8@pop.ma.ultranet.com> References: <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20020402074837 DOT 02a020e8 AT pop3 DOT cris DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Larry, Stuart, I did not look closely enough at the output when I ran my test. I was expecting some more dramatic failure, I guess. I do _not_ see proper alternation of "foo" and "bar." The transpositions occur in iterations 33 45 51 54 64 69 74 79 83 98 105 110 114 122 140 147 154 163 174 190 203 208 214 217 ... I don't see a pattern, so I suppose some sort of race condition is suggested. Perhaps the wait(2) system call used by the shell after the fork for the built-in echo is not really waiting. (BASH should fork for that command, right?) Strace might give useful information or it might perturb things to the point the symptom is no longer seen. Randall Schulz Mountain View, CA USA At 08:14 2002-04-02, Larry Hall (RFK Partners, Inc) wrote: >I can reproduce Stuart's problem on W2K. I'm on a uni-processor machine. >I've only tried it interactively. Removing the pipe from the process >makes "foo" and "bar" alternate as expected. With the pipe the resultis: > > >while( true ); do echo foo; /bin/echo bar; done | cat >... >. >. >. > >This is with Cygwin 1.3.10. Just as an alternate data point to avoid too >much emphasis on Stuart's configuration. > >Larry Hall -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/