Core: Fixed Win32 LocalProcess problem truncating pipe output

This commit is contained in:
Mirek Fidler 2023-04-27 10:50:13 +02:00
parent 5943687992
commit 1a9727eef6

View file

@ -430,6 +430,7 @@ bool LocalProcess::IsRunning() {
return false;
if(GetExitCodeProcess(hProcess, &exitcode) && exitcode == STILL_ACTIVE)
return true;
WaitForSingleObject(hProcess, 200); // this is needed to finish pushing the output to the pipe, 200ms instead of INFINITE just prudence
dword n;
if(PeekNamedPipe(hOutputRead, NULL, 0, NULL, &n, NULL) && n)
return true;