Skip to content

Commit

Permalink
src: reset TTY mode before cleaning up resources
Browse files Browse the repository at this point in the history
Otherwise, closing all handles associated with the main
event loop would also mean that `uv_tty_reset_mode()`
can’t function properly because the corresponding FDs have
already been closed.

Fixes: #21020
PR-URL: #21257
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
addaleax authored and evanlucas committed Jun 12, 2018
1 parent e5c2f57 commit cb5ec64
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4396,6 +4396,7 @@ inline int Start(Isolate* isolate, IsolateData* isolate_data,
WaitForInspectorDisconnect(&env);

env.set_can_call_into_js(false);
uv_tty_reset_mode();
env.RunCleanup();
RunAtExit(&env);

Expand Down

0 comments on commit cb5ec64

Please sign in to comment.