mirror of
https://github.com/curl/curl.git
synced 2026-05-14 22:36:21 +03:00
sockfilt.c: fixed getting stuck waiting for MinGW stdin pipe
This commit is contained in:
parent
a5d7ec1848
commit
6a03f6368f
1 changed files with 7 additions and 3 deletions
|
|
@ -568,14 +568,18 @@ static DWORD WINAPI select_ws_stdin_wait_thread(LPVOID lpParameter)
|
|||
case FILE_TYPE_PIPE:
|
||||
while(WaitForMultipleObjectsEx(2, handles, FALSE, INFINITE, FALSE)
|
||||
== WAIT_OBJECT_0 + 1) {
|
||||
if(!PeekNamedPipe(handle, NULL, 0, NULL, &length, NULL)) {
|
||||
if(PeekNamedPipe(handle, NULL, 0, NULL, &length, NULL)) {
|
||||
if(length == 0)
|
||||
SleepEx(100, FALSE);
|
||||
else
|
||||
break;
|
||||
}
|
||||
else {
|
||||
if(GetLastError() == ERROR_BROKEN_PIPE)
|
||||
SleepEx(100, FALSE);
|
||||
else
|
||||
break;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue