mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
If hProcess is NULL, read_all_handle returns if it would block
This commit is contained in:
+3
-3
@@ -3304,12 +3304,12 @@ read_all_handle(HANDLE h, char *buf, size_t count, HANDLE hProcess)
|
||||
"Failed to peek from handle: %s",
|
||||
format_win32_error(GetLastError()));
|
||||
return -1;
|
||||
} else if (0 == byte_count) {
|
||||
} else if (0 == byte_count)
|
||||
/* Nothing available: process exited or it is busy */
|
||||
|
||||
/* Keep on reading if we don't know whether the process is running */
|
||||
/* Exit if we don't know whether the process is running */
|
||||
if (NULL == hProcess)
|
||||
continue;
|
||||
break;
|
||||
|
||||
/* The process exited and there's nothing left to read from it */
|
||||
if (process_exited)
|
||||
|
||||
Reference in New Issue
Block a user