From 900f7a8f5c056beb5041b8047d4d7aece11f580f Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Thu, 28 Jul 2011 18:14:09 +0000 Subject: Remove sigint handler on repl exit as a sanity ... Remove sigint handler on repl exit as a sanity check, no review. --- src/compiler/scala/tools/nsc/interpreter/ILoop.scala | 1 + src/compiler/scala/tools/nsc/interpreter/ILoopInit.scala | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/compiler/scala/tools/nsc/interpreter/ILoop.scala b/src/compiler/scala/tools/nsc/interpreter/ILoop.scala index 8ae4f9779a..2ff8bb343f 100644 --- a/src/compiler/scala/tools/nsc/interpreter/ILoop.scala +++ b/src/compiler/scala/tools/nsc/interpreter/ILoop.scala @@ -86,6 +86,7 @@ class ILoop(in0: Option[BufferedReader], protected val out: JPrintWriter) if (intp ne null) { intp.close intp = null + removeSigIntHandler() Thread.currentThread.setContextClassLoader(originalClassLoader) } } diff --git a/src/compiler/scala/tools/nsc/interpreter/ILoopInit.scala b/src/compiler/scala/tools/nsc/interpreter/ILoopInit.scala index f2171ad732..d711428d22 100644 --- a/src/compiler/scala/tools/nsc/interpreter/ILoopInit.scala +++ b/src/compiler/scala/tools/nsc/interpreter/ILoopInit.scala @@ -59,6 +59,9 @@ trait ILoopInit { } } } + protected def removeSigIntHandler() { + SignalManager("INT") = null + } private val initLock = new java.util.concurrent.locks.ReentrantLock() private val initCompilerCondition = initLock.newCondition() // signal the compiler is initialized -- cgit v1.2.3