From 3d8715017fa01477089bd4946f05666da6ffd791 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 18 Sep 2016 11:16:45 +0200 Subject: [PATCH] Revert "repl: disable Ctrl+C support on win32 for now" This reverts commit f59b8888f12b491c69cc5be6f812414d50b1ec36 now that the libuv update containing the proper fix has landed in 63243bcb330408d511b3945c53719425d8b7abb8. 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 Reviewed-By: James M Snell Reviewed-By: Bartosz Sosnowski Reviewed-By: Colin Ihrig --- lib/repl.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index 760182ebe4ebba..8b00998be86968 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -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);