http://bugs.winehq.org/show_bug.cgi?id=58745 Bug ID: 58745 Summary: PeekNamedPipe() unsuccessful on stdin Product: Wine Version: 10.10 Hardware: x86-64 OS: FreeBSD Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs(a)winehq.org Reporter: rhaberkorn(a)fmsbw.de Created attachment 79378 --> http://bugs.winehq.org/attachment.cgi?id=79378 Test program for PeekNamedPipe() bug Trying to debug a glib2 problem occurring under Wine, I encountered what is obviously a bug in Wine itself. See the attached test program. This is what I observed on Wine: # wine peeknamedpipe.exe < somefile stat: console=0 fifo=0 ReadFile(stdin): 1 PeekNamedPipe(stdin): 0 # echo TEST | wine peeknamedpipe.exe stat: console=0 fifo=4096 ReadFile(stdin): 1 PeekNamedPipe(stdin): 0 On a real Windows 10 however it behaves differently:
peeknamedpipe.exe < somefile stat: console=0 fifo=0 ReadFile(stdin): 1 PeekNamedPipe(stdin): 0
echo TEST | peeknamedpipe.exe stat: console=0 fifo=4096 ReadFile(stdin): 1 PeekNamedPipe(stdin): 1
In other words, PeekNamedPipe() returns FALSE on stdin when piping from another process instead of TRUE, which is returned by a real Windows 10. somefile needs to be some non-empty file of course. This was tested both on Wine 10.0 and 10.10 (wine-devel) from the FreeBSD ports tree. I filed this in kernel32 since PeekNamedPipe() is part of Kernel32.dll (at least according to the Microsoft documentation). -- 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.