diff options
| author | Divy Srivastava <dj.srivastava23@gmail.com> | 2024-05-29 09:53:04 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-29 22:23:04 +0530 |
| commit | a947c6fbf7c71544687c79716eadbffe4bdedc82 (patch) | |
| tree | 50807b95951b2aaf6b2126f66cd02e8990fd7bcd /Cargo.lock | |
| parent | 4f9b23b3664578c2bf48415db246fb21e49abddb (diff) | |
fix(ext/node): windows cancel stdin read in line mode (#23969)
This patch fixes stdin read hanging on user input when switching tty
mode on Windows
Fixes #21111
On Windows, when switching from line to raw mode:
- Cancel ongoing console read by writing a return keypress to its input
buffer. This blocks the main thread until any ongoing read has been
cancelled to prevent interference with the screen state.
- On the read thread, restore the cursor position to where it was before
writing the enter, undoing its effect on the screen state.
- Restart reading and notify the main thread.
Diffstat (limited to 'Cargo.lock')
| -rw-r--r-- | Cargo.lock | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock index 41679e239..37a3fbcbd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1555,6 +1555,7 @@ dependencies = [ "log", "once_cell", "os_pipe", + "parking_lot 0.12.1", "rand", "tokio", "winapi", |
