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: <3D4A62ED.4050207@colorfullife.com> Date: Fri, 02 Aug 2002 12:46:05 +0200 From: Manfred Spraul User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: 1.3.12: bash reorders output Content-Type: multipart/mixed; boundary="------------000709000700080204000803" --------------000709000700080204000803 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I'm running into an odd bug when I run a large script - it seems that the output from an external application remains stuck somewhere in a buffer, and thus data is reordered in a bash script. <<<<<<< bash script. func() { echo "x" external_prog < input_data.txt echo "y" } func > result.txt >>>>>>>>>>>> The output of the script is <<< x y output_of_the_external_prog <<<<< instead of <<< x output_of_the_external_prog y <<< Has anyone seen such a behaviour before? Should I try other cygwin versions? I've tried without success to create a simple test case - I can only reproduce it with a ~ 7 kB long script, if I remove (IMHO) unrelated lines, the bug disappears. The external program generates ~ 6 kb data. The complete size of result.txt is around 35 kB, i.e. there are 6 blocks that call the external program, and only in one case the output is reordered. If I add "id > /dev/null" after the call of external_prog, then result.txt is correct. Has anyone an idea what could cause that behaviour? I can test patches, or just hints in which part of the cygwin sources I should start searching for the bug. -- Manfred --------------000709000700080204000803 Content-Type: text/plain; name="cygcheck.out" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cygcheck.out" Cygwin Win95/NT Configuration Diagnostics Current System Time: Fri Aug 02 12:26:02 2002 Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 2 Path: C:\cygwin\usr\local\bin C:\cygwin\bin C:\cygwin\bin c:\WINNT\system32 c:\WINNT c:\WINNT\System32\Wbem c:\Program Files\Ansys Inc\ANSYS60\bin\intel c:\WINNT\system32 c:\WINNT c:\WINNT\System32\Wbem c:\Program Files\Ansys Inc\ANSYS60\bin\intel c:\tools c:\vim\vim61\ C:\cygwin\bin SysDir: C:\WINNT\System32 WinDir: C:\WINNT HOME = `C:\cygwin\home\Manfred Spraul' MAKE_MODE = `unix' PWD = `/cygdrive/c/temp' USER = `Manfred Spraul' ALLUSERSPROFILE = `C:\Documents and Settings\All Users' ANSYS60_DIR = `C:\PROGRAM FILES\ANSYS INC\ANSYS60' ANSYSLIC_DIR = `C:\PROGRAM FILES\ANSYS INC\SHARED FILES\LICENSING' ANSYS_SYSDIR = `Intel' APPDATA = `C:\Documents and Settings\Manfred Spraul\Application Data' COMMONPROGRAMFILES = `C:\Program Files\Common Files' COMPUTERNAME = `AB' COMSPEC = `C:\WINNT\system32\cmd.exe' EVOLVERPATH = `C:\tools\' HOMEDRIVE = `C:' HOMEPATH = `\' LOGONSERVER = `\\AB' MANPATH = `:/usr/ssl/man' MPSTKZ = `8m' NUMBER_OF_PROCESSORS = `1' OLDPWD = `/cygdrive/f/CC' OS2LIBPATH = `C:\WINNT\system32\os2\dll;' OS = `Windows_NT' PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH' PROCESSOR_ARCHITECTURE = `x86' PROCESSOR_IDENTIFIER = `x86 Family 6 Model 11 Stepping 1, GenuineIntel' PROCESSOR_LEVEL = `6' PROCESSOR_REVISION = `0b01' PROGRAMFILES = `C:\Program Files' PROMPT = `$P$G' PS1 = `\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ ' SHLVL = `1' SYSTEMDRIVE = `C:' SYSTEMROOT = `C:\WINNT' TEMP = `c:\TEMP' TERM = `cygwin' TMP = `c:\TEMP' USERDOMAIN = `AB' USERNAME = `Manfred Spraul' USERPROFILE = `C:\Documents and Settings\Manfred Spraul' WINDIR = `C:\WINNT' _ = `/usr/bin/cygcheck' HKEY_CURRENT_USER\Software\Cygnus Solutions HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2 HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2 (default) = `/cygdrive' cygdrive flags = 0x00000022 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/ (default) = `C:\cygwin' flags = 0x0000000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin (default) = `C:\cygwin/bin' flags = 0x0000000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib (default) = `C:\cygwin/lib' flags = 0x0000000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/X11R6/lib/X11/fonts (default) = `C:\cygwin\usr\X11R6\lib\X11\fonts' flags = 0x0000000a HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options a: fd N/A N/A c: hd FAT32 3992Mb 76% CP UN e: cd CDFS 173Mb 100% CS UN NEU f: hd FAT32 8447Mb 24% CP UN C:\cygwin / system binmode C:\cygwin/bin /usr/bin system binmode C:\cygwin/lib /usr/lib system binmode C:\cygwin\usr\X11R6\lib\X11\fonts /usr/X11R6/lib/X11/fonts system binmode . /cygdrive user binmode,cygdrive Found: C:\cygwin\bin\bash.exe Found: C:\cygwin\bin\cat.exe Found: C:\cygwin\bin\cpp.exe Found: C:\cygwin\bin\find.exe Found: C:\cygwin\bin\gcc.exe Found: C:\cygwin\bin\gdb.exe Found: C:\cygwin\bin\ld.exe Found: C:\cygwin\bin\ls.exe Found: C:\cygwin\bin\make.exe Found: C:\cygwin\bin\sh.exe 19k 2002/02/20 C:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0 "cyggdbm.dll" v0.0 ts=2002/2/20 4:05 929k 2002/06/24 C:\cygwin\bin\cygiconv-2.dll - os=4.0 img=1.0 sys=4.0 "cygiconv-2.dll" v0.0 ts=2002/6/24 20:24 21k 2001/06/20 C:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0 "cygintl.dll" v0.0 ts=2001/6/20 19:09 22k 2001/12/13 C:\cygwin\bin\cygintl-1.dll - os=4.0 img=1.0 sys=4.0 "cygintl-1.dll" v0.0 ts=2001/12/13 10:28 23k 2002/06/24 C:\cygwin\bin\cygintl-2.dll - os=4.0 img=1.0 sys=4.0 "cygintl-2.dll" v0.0 ts=2002/6/24 6:54 45k 2001/04/25 C:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0 "cygform5.dll" v0.0 ts=2001/4/25 7:28 26k 2001/04/25 C:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0 "cygmenu5.dll" v0.0 ts=2001/4/25 7:27 156k 2001/04/25 C:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0 "cygncurses++5.dll" v0.0 ts=2001/4/25 7:29 226k 2001/04/25 C:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0 "cygncurses5.dll" v0.0 ts=2001/4/25 7:17 15k 2001/04/25 C:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0 "cygpanel5.dll" v0.0 ts=2001/4/25 7:27 35k 2002/01/09 C:\cygwin\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0 "cygform6.dll" v0.0 ts=2002/1/9 7:03 20k 2002/01/09 C:\cygwin\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0 "cygmenu6.dll" v0.0 ts=2002/1/9 7:03 175k 2002/01/09 C:\cygwin\bin\cygncurses++6.dll - os=4.0 img=1.0 sys=4.0 "cygncurses++6.dll" v0.0 ts=2002/1/9 7:03 202k 2002/01/09 C:\cygwin\bin\cygncurses6.dll - os=4.0 img=1.0 sys=4.0 "cygncurses6.dll" v0.0 ts=2002/1/9 7:03 12k 2002/01/09 C:\cygwin\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0 "cygpanel6.dll" v0.0 ts=2002/1/9 7:03 17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0 "cyghistory4.dll" v0.0 ts=2001/1/7 5:34 108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0 "cygreadline4.dll" v0.0 ts=2001/1/7 5:34 40k 2001/11/21 C:\cygwin\bin\cygpcre.dll - os=4.0 img=1.0 sys=4.0 "cygpcre.dll" v0.0 ts=2001/11/21 23:15 39k 2001/11/21 C:\cygwin\bin\cygpcreposix.dll - os=4.0 img=1.0 sys=4.0 "cygpcreposix.dll" v0.0 ts=2001/11/21 23:15 50k 2002/03/12 C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0 "cygz.dll" v0.0 ts=2002/3/12 5:38 58k 2002/05/07 C:\cygwin\bin\cygbz2-1.dll - os=4.0 img=1.0 sys=4.0 "cygbz2-1.dll" v0.0 ts=2002/5/7 8:33 81k 2001/10/20 C:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0 "cygitcl30.dll" v0.0 ts=2001/10/20 2:25 35k 2001/10/20 C:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0 "cygitk30.dll" v0.0 ts=2001/10/20 2:25 390k 2001/10/20 C:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0 "cygtcl80.dll" v0.0 ts=2001/10/20 2:24 5k 2001/10/20 C:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0 10k 2001/10/20 C:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0 "cygtclreg80.dll" v0.0 ts=2001/10/20 2:24 623k 2001/10/20 C:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0 "cygtk80.dll" v0.0 ts=2001/10/20 2:25 621k 2002/05/17 C:\cygwin\bin\cygcrypto.dll - os=4.0 img=1.0 sys=4.0 "cygcrypto.dll" v0.0 ts=2002/5/17 14:24 156k 2002/05/17 C:\cygwin\bin\cygssl.dll - os=4.0 img=1.0 sys=4.0 "cygssl.dll" v0.0 ts=2002/5/17 14:24 20k 2002/07/17 C:\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0 "cyghistory5.dll" v0.0 ts=2002/7/17 23:18 127k 2002/07/17 C:\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0 "cygreadline5.dll" v0.0 ts=2002/7/17 23:18 883k 2002/07/06 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0 "cygwin1.dll" v0.0 ts=2002/7/6 8:16 Cygwin DLL version info: DLL version: 1.3.12 DLL epoch: 19 DLL bad signal mask: 19005 DLL old termios: 5 DLL malloc env: 28 API major: 0 API minor: 54 Shared data: 3 DLL identifier: cygwin1 Mount registry: 2 Cygnus registry name: Cygnus Solutions Cygwin registry name: Cygwin Program options name: Program Options Cygwin mount registry name: mounts v2 Cygdrive flags: cygdrive flags Cygdrive prefix: cygdrive prefix Cygdrive default prefix: Build date: Sat Jul 6 02:16:58 EDT 2002 CVS tag: cygwin-1-3-12-1 Shared id: cygwin1S3 Cygwin Package Information Last downloaded files to: c:\cygpkgs Last downloaded files from: ftp://ftp.inf.tu-dresden.de/software/windows/cygwin32 Package Version XFree86-base 4.2.0-1 XFree86-bin 4.2.0-1 XFree86-etc 4.2.0-1 XFree86-fenc 4.2.0-2 XFree86-fnts 4.2.0-2 XFree86-lib 4.2.0-3 XFree86-startup-scripts4.2.0-2 XFree86-xserv 4.2.0-10 _update-info-dir 00037-1 ash 20020131-1 bash 2.05b-1 binutils 20020706-2 bzip2 1.0.2-2 crypt 1.0-1 cvs 1.11.0-1 cygwin 1.3.12-2 diff 1.0-1 diffutils 2.8.1-1 fileutils 4.1-1 findutils 4.1.7-4 gawk 3.0.4-1 gcc 3.1.1-4 gdb 20010428-3 gdbm 1.8.0-4 gettext 0.11.2-2 grep 2.5-1 groff 1.17.2-1 gzip 1.3.3-3 less 374-1 libbz2_1 1.0.2-2 libiconv2 1.8-2 libintl 0.10.38-3 libintl1 0.10.40-1 libintl2 0.11.2-2 libncurses5 5.2-1 libncurses6 5.2-8 libreadline4 4.1-2 libreadline5 4.3-1 login 1.4-3 make 3.79.1-7 man 1.5g-2 mingw-runtime 2.0-2 ncurses 5.2-8 openssh 3.4p1-4 openssl 0.9.6d-1 pcre 3.7-1 readline 4.3-1 sed 3.02-1 sh-utils 2.0-2 tar 1.13.19-1 termcap 20020403-1 terminfo 5.2-3 texinfo 4.2-3 textutils 2.0.21-1 vim 6.1-2 w32api 1.5-1 which 1.5-1 zlib 1.1.4-1 Use -h to see help about each section --------------000709000700080204000803 Content-Type: text/plain; charset=us-ascii -- 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/ --------------000709000700080204000803--