https://bugs.winehq.org/show_bug.cgi?id=51719
Bug ID: 51719 Summary: _pclose() does not cause child stdin to report EOF Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt Assignee: wine-bugs@winehq.org Reporter: andres@winehq.anarazel.de Distribution: ---
Created attachment 70602 --> https://bugs.winehq.org/attachment.cgi?id=70602 regression test showing the bug
Hi,
Normally when the write end of a pipe is closed, the read end should see that upon further reads. However wine's _popen()/_pclose() do not work that way - a child's read from stdin blocks after the parent's _pclose().
I've attached a patch to the tests to show the problem. The tests hang, but should succeed.
I reproduced this on git commit 8b9f1e12841298591387e2b7590191610a37986e
Regards,
Andres
PS: I encountered this because I was trying to fix a bug in the windows port of postgres without having to use windows...
https://bugs.winehq.org/show_bug.cgi?id=51719
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piotr.caban@gmail.com Fixed by SHA1| |e38f3761f890ccc0b32ac16c633 | |cdf7582511133 Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Piotr Caban piotr.caban@gmail.com --- I've sent a patch that fixes attached test. Marking as fixed.
https://bugs.winehq.org/show_bug.cgi?id=51719
--- Comment #2 from Andres Freund andres@winehq.anarazel.de ---
I've sent a patch that fixes attached test. Marking as fixed.
Awesome. I can confirm that this doesn't just fix the testcase, but also allows a cross-built postgres to at least get as far as creating the data directory (i.e. initdb.exe succeeds).
https://bugs.winehq.org/show_bug.cgi?id=51719
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.21.