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 2018-05-30 11:18:43 +02:00
parent cea10baa22
commit 43fd1d793a
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -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);