This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Bash bug? - piped loops using builtin echo and stdout
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/