Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#89433 - arlosi:stdin-fix, r=joshtriplett
Fix ctrl-c causing reads of stdin to return empty on Windows. Pressing ctrl+c (or ctrl+break) on Windows caused a blocking read of stdin to unblock and return empty, unlike other platforms which continue to block. On ctrl-c, `ReadConsoleW` will return success, but also set `LastError` to `ERROR_OPERATION_ABORTED`. This change detects this case, and re-tries the call to `ReadConsoleW`. Fixes rust-lang#89177. See issue for further details. Tested on Windows 7 and Windows 10 with both MSVC and GNU toolchains
- Loading branch information