http://bugs.winehq.org/show_bug.cgi?id=58967
Eric Pouech eric.pouech@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED CC| |eric.pouech@gmail.com Ever confirmed|0 |1
--- Comment #2 from Eric Pouech eric.pouech@gmail.com --- confirming (and thanks for the repro, so easier...)
had a look at it...
in fact, there are several issues:
#1: first failure arises from CloseHandle(hPipeIn_Write); at the end of section #4 of your repro
Wine's conhost.exe terminates when its input gets closed, while it looks like native conhost.exe terminates only when both input & output pipes get closed
commenting out that line lets ping's output be displayed; but that will require conhost to be fixed
#2 but as you've stated, ping's output is using inherited handles from parent's console we likely miss some bits in console init in kernelbase/console.c I've hacked something that make it work, but will require some more tests (the tests we have for pseudo-console only deal with console APIs, not the std handles the child process is created with)
#3 the console's screen is erased before printing ping's output, that's likely an artefact of mixing old console APIs with new ones somewhere, didn't look yet where it comes from)
Notes: 1) after hacking around #1 and #2, ping's output is displayed as expected (side remark: changing your repro test to output to std error instead of std output helps checking that we don't mix ping's output) 2) even changing WriteFile into CRT's (f)printf works as expected (so IMO, there's no issue in CRT, as long as std handles are correctly initialized in kernel)
Wine enters code freeze in two weeks from now, not sure I'll have the time to tackle all issues before that. Will start with #2 anyway.