try 3
This commit is contained in:
@@ -210,8 +210,10 @@ PRIVATE_DEFINITION_START(PIProcess)
|
||||
size_t offset = 0;
|
||||
while (1) {
|
||||
# ifdef WINDOWS
|
||||
PeekNamedPipe(pipes[pipe_type][PipeRead], nullptr, 0, nullptr, &bytes_read, nullptr);
|
||||
if (bytes_read > 0) {
|
||||
DWORD available = 0;
|
||||
bytes_read = 0;
|
||||
PeekNamedPipe(pipes[pipe_type][PipeRead], nullptr, 0, nullptr, &available, nullptr);
|
||||
if (available > 0) {
|
||||
BOOL ok = ReadFile(pipes[pipe_type][PipeRead],
|
||||
read_buffer.data(offset),
|
||||
piMini(available, read_buffer.size() - offset),
|
||||
|
||||
Reference in New Issue
Block a user