Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
win,tty: fix deadlock caused by inconsistent state
The variable uv__read_console_status is left as IN_PROGRESS when the operation is cancelled ahead of time by the main thread requesting a trap (race condition?). This confuses the next call to uv__cancel_read_console(...) causing a deadlock due to a semaphore aquisition that is never released by the reading thread. Setting the status variable back to COMPLETE or NOT_STARTED fixes the issue. Fixes: nodejs/node#32999
- Loading branch information