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 committed 2019-08-17 15:49:44 -04:00
1 parent 9b7362c460
commit a5edceea04
1 file changed
+2
+2
View File
@@ -823,6 +823,8 @@ function _ttyWriteDumb(s, key) {
// This readline instance is finished
this.close();
}
return;
}
switch (key.name) {