summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-05-30 11:18:43 +0200
committerAnna Henningsen <anna@addaleax.net>2018-06-12 00:16:10 +0200
commit43fd1d793af09aea3789f0e2af88d7f189d696a1 (patch)
tree53dc0e269af1a48c9e4327d7b6477e08eae559b8
parentcea10baa221e7ed3c5408d526dcec4fb7a6e99fa (diff)
downloadandroid-node-v8-43fd1d793af09aea3789f0e2af88d7f189d696a1.tar.gz
android-node-v8-43fd1d793af09aea3789f0e2af88d7f189d696a1.tar.bz2
android-node-v8-43fd1d793af09aea3789f0e2af88d7f189d696a1.zip
src: reset TTY mode before cleaning up resources
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: https://github.com/nodejs/node/issues/21020 PR-URL: https://github.com/nodejs/node/pull/21257 Reviewed-By: Richard Lau <riclau@uk.ibm.com>
-rw-r--r--src/node.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node.cc b/src/node.cc
index 75dbafa1ab..bdeb2b1317 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -4180,6 +4180,7 @@ inline int Start(Isolate* isolate, IsolateData* isolate_data,
env.set_can_call_into_js(false);
env.stop_sub_worker_contexts();
+ uv_tty_reset_mode();
env.RunCleanup();
RunAtExit(&env);