repl: disable Ctrl+C support on win32 for now · nodejs/node@f59b888

@@ -289,7 +289,13 @@ function REPLServer(prompt,

289289

if (!err) {

290290

// Unset raw mode during evaluation so that Ctrl+C raises a signal.

291291

let previouslyInRawMode;

292-

if (self.breakEvalOnSigint) {

292+293+

// Temporarily disabled on Windows due to output problems that likely

294+

// result from the raw mode switches here, see

295+

// https://github.com/nodejs/node/issues/7837

296+

// Setting NODE_REPL_CTRLC is meant as a temporary opt-in for debugging.

297+

if (self.breakEvalOnSigint &&

298+

(process.platform !== 'win32' || process.env.NODE_REPL_CTRLC)) {

293299

// Start the SIGINT watchdog before entering raw mode so that a very

294300

// quick Ctrl+C doesn’t lead to aborting the process completely.

295301

utilBinding.startSigintWatchdog();

@@ -309,7 +315,8 @@ function REPLServer(prompt,

309315

result = script.runInContext(context, scriptOptions);

310316

}

311317

} finally {

312-

if (self.breakEvalOnSigint) {

318+

if (self.breakEvalOnSigint &&

319+

(process.platform !== 'win32' || process.env.NODE_REPL_CTRLC)) {

313320

// Reset terminal mode to its previous value.

314321

self._setRawMode(previouslyInRawMode);

315322