https://bugs.winehq.org/show_bug.cgi?id=48027
Bug ID: 48027 Summary: cmd pipe | not triggering ReadFile EOF Product: Wine Version: 4.18 Hardware: x86 OS: Linux Status: NEW Severity: minor Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: dark.shadow4@web.de Distribution: ---
Test program is find.exe as of wine commit ccec532879ec14b2e79da08288152a69221ec4d1.
I implemented the program so it waits for ReadFile to return FALSE, that's when the input is supposed to be over: ###### BOOL success = ReadFile(handle, buffer, 4096, &buffer_max, NULL); if (!success) return FALSE; ######
Now that's not right anyways, but it exposes a slight difference in Wine cmd:
1) Following input hangs on Wine, but not on Windows: "echo test | find test" It works on Wine when using "winetricks -q cmd"
2) Following input hangs on both Windows and Wine: "find test < test.txt"
Wine's implementation of the pipe | uses the redirect operator < internally. This leads to the pipe working differently on Wine, i.e. blocking ReadFile when it's not supposed to.
I'm not aware of a real program being affected by that, just noting.