readline: close dumb terminals on Control+C

This commit adds support for closing a readline interface
on Control+C when the terminal is dumb.

PR-URL: https://github.com/nodejs/node/pull/29149
Fixes: https://github.com/nodejs/node/issues/29111
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
cjihrig 2019-08-15 12:17:16 -04:00
parent 9b7362c460
commit a5edceea04
No known key found for this signature in database
GPG Key ID: 7434390BDBE9B9C5

View File

@ -823,6 +823,8 @@ function _ttyWriteDumb(s, key) {
// This readline instance is finished
this.close();
}
return;
}
switch (key.name) {