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>
This commit is contained in:
Anna Henningsen authored and Evan Lucas committed 2018-06-12 05:07:16 -05:00
1 parent e5c2f575b1
commit cb5ec64956
1 file changed
+1
+1
View File
@@ -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);