X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Date: Thu, 30 Jul 2009 15:48:39 +0200 (CEST) Message-Id: <200907301348.n6UDmdZK020841@mail.bln1.bf.nsn-intra.net> From: Thomas Wolff To: cygwin AT cygwin DOT com Subject: Re: bash pipeline exit code - possible race condition? Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 David Antliff wrote: > >>I've noticed a strange problem with bash pipelines in Cygwin that > >>might indicate some sort of race condition. I cannot reproduce the > >>problem on a Linux system, but it seems easy to reproduce in > Cygwin. > > > > This doesn't appear to be a cygwin problem. I get occasional errors > > on linux as well. > > I tried to reproduce on Linux but without success - did you simply run > my script or perhaps something else? Do you see error "141" as well? I got a first occurrence at count 32500, another at count 33693 ... Eric Blake wrote: > Status 141 is from SIGPIPE. Basically, it happens when the read end of the > pipe exits before the writer. ... Just a hint for testing/checking: You get more frequent occurrences if you replace "head -1" with "true" and "make ..." with something like "ls -l /bin" ... Thomas -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple