Skip to content

Commit

Permalink
Revert "repl: disable Ctrl+C support on win32 for now"
Browse files Browse the repository at this point in the history
This reverts commit f59b888
now that the libuv update containing the proper fix has
landed in 63243bc.

Ref: libuv/libuv#1054
Ref: #7837
PR-URL: #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>
  • Loading branch information
addaleax authored and italoacasas committed Jan 27, 2017
1 parent 6e8d627 commit e7b656d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);

Expand Down

0 comments on commit e7b656d

Please sign in to comment.