https://bugs.winehq.org/show_bug.cgi?id=34930 --- Comment #6 from Qian Hong <fracting(a)gmail.com> --- According to relay log: 0023:Call KERNEL32.GetStdHandle(fffffff6) ret=610299bf 0023:Ret KERNEL32.GetStdHandle() retval=00000017 ret=610299bf ... 0023:Call KERNEL32.GetFileType(0000001b) ret=610293bb 0023:Ret KERNEL32.GetFileType() retval=00000002 ret=610293bb 0023:Call KERNEL32.GetConsoleScreenBufferInfo(0000001b,0061aa16) ret=610293f7 0023:trace:console:GetConsoleScreenBufferInfo (0x1b,(80,150) (0,0) 15 (0,0-79,24) (80,25) 0023:Ret KERNEL32.GetConsoleScreenBufferInfo() retval=00000001 ret=610293f7 0023:Call KERNEL32.CloseHandle(0000001b) ret=61029853 0023:Ret KERNEL32.CloseHandle() retval=00000001 ret=61029853 So STDOUT (STD_OUTPUT_HANDLE:fffffff6 =>0000001b) is closed here. I'm looking into the below cygwin code: winsup/cygwin/dtable.cc: dtable::init_std_file_from_handle: 311 else if (GetConsoleScreenBufferInfo (handle, &buf) 312 || GetNumberOfConsoleInputEvents (handle, (DWORD *) &buf)) 313 { 314 /* Console I/O */ 315 if (myself->ctty > 0) 316 dev.parse (myself->ctty); 317 else 318 { 319 dev.parse (FH_CONSOLE); 320 CloseHandle (handle); 321 handle = INVALID_HANDLE_VALUE; 322 } 323 } Not sure why ctty is not positive here. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.