From cb5ec64956e4e6a61aae976ac908ab9952035ec5 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 30 May 2018 11:18:43 +0200 Subject: [PATCH] src: reset TTY mode before cleaning up resources MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/node.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node.cc b/src/node.cc index eda97d81df1d9e..481be85717821c 100644 --- a/src/node.cc +++ b/src/node.cc @@ -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);