Fix Windows console poll() copy/paste regression

This commit is contained in:
Justine Tunney 2024-09-05 21:12:48 -07:00
parent 41fc76c2b8
commit 07fde68d52
No known key found for this signature in database
GPG key ID: BE714B4575D6E328

View file

@ -901,6 +901,11 @@ RestartOperation:
}
textwindows int CountConsoleInputBytesBlocking(uint32_t ms, sigset_t waitmask) {
int got = CountConsoleInputBytes();
if (got == -1)
return 0;
if (got > 0)
return got;
uint32_t inmode = DisableProcessedInput();
int rc = CountConsoleInputBytesBlockingImpl(ms, waitmask, false);
RestoreProcessedInput(inmode);