From 43fd1d793af09aea3789f0e2af88d7f189d696a1 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 75dbafa1ab4..bdeb2b1317d 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);