mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
Revert "repl: disable Ctrl+C support on win32 for now"
This reverts commitf59b8888f1now that the libuv update containing the proper fix has landed in63243bcb33. Ref: https://github.com/libuv/libuv/pull/1054 Ref: https://github.com/nodejs/node/issues/7837 PR-URL: https://github.com/nodejs/node/pull/8645 Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
1 parent
03302d6133
commit
1d400ea484
1 file changed
+2
-9
+2
-9
@@ -322,13 +322,7 @@ function REPLServer(prompt,
|
||||
if (!err) {
|
||||
// Unset raw mode during evaluation so that Ctrl+C raises a signal.
|
||||
let previouslyInRawMode;
|
||||
|
||||
// Temporarily disabled on Windows due to output problems that likely
|
||||
// result from the raw mode switches here, see
|
||||
// https://github.com/nodejs/node/issues/7837
|
||||
// Setting NODE_REPL_CTRLC is meant as a temporary opt-in for debugging.
|
||||
if (self.breakEvalOnSigint &&
|
||||
(process.platform !== 'win32' || process.env.NODE_REPL_CTRLC)) {
|
||||
if (self.breakEvalOnSigint) {
|
||||
// Start the SIGINT watchdog before entering raw mode so that a very
|
||||
// quick Ctrl+C doesn’t lead to aborting the process completely.
|
||||
utilBinding.startSigintWatchdog();
|
||||
@@ -348,8 +342,7 @@ function REPLServer(prompt,
|
||||
result = script.runInContext(context, scriptOptions);
|
||||
}
|
||||
} finally {
|
||||
if (self.breakEvalOnSigint &&
|
||||
(process.platform !== 'win32' || process.env.NODE_REPL_CTRLC)) {
|
||||
if (self.breakEvalOnSigint) {
|
||||
// Reset terminal mode to its previous value.
|
||||
self._setRawMode(previouslyInRawMode);
|
||||
|
||||
|
||||
Reference in new issue
Block a user