This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: bash pipeline exit code - possible race condition?


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


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