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]

Sequential writes to stdout is messed up (Bash only?)


Hi,

The problem can be demonstrated by executing the following in bash:

printf 1 > 1; while true; do cat 1; echo 2; done

Expected result would be an endless stream of 12-s:
12
12
...

The real result is something different - see below.

Executing
ksh -c 'printf 1 > 1; while true; do cat 1; echo 2; done'
gives the expected stream (pdksh).

BR,
Krisztian Fekete

PS.: 
My cygwin is up to date, running on Windows 2000.

cygwin/bash result:
12
12
12
12
12
12
2
112
12
12
2
2
12
112
12
2
1112
2
2
1112
12
2
2
12
12
1112
...




--
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/


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