File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
frontend/src/main/scala/bloop Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ import java.io.File
32
32
import org .slf4j
33
33
import java .nio .file .attribute .PosixFilePermissions
34
34
import java .nio .file .Path
35
+ import sun .misc .{Signal , SignalHandler }
35
36
36
37
sealed abstract class Bloop
37
38
@@ -67,6 +68,9 @@ object Bloop {
67
68
)
68
69
}
69
70
71
+ if (java.lang.Boolean .getBoolean(" bloop.ignore-sig-int" ))
72
+ ignoreSigint()
73
+
70
74
lockFilesOrHostPort match {
71
75
case Left (hostPort) =>
72
76
startServer(Left (hostPort))
@@ -80,6 +84,16 @@ object Bloop {
80
84
}
81
85
}
82
86
87
+ private def ignoreSigint (): Unit = {
88
+ Signal .handle(
89
+ new Signal (" INT" ),
90
+ signal => {
91
+ System .err.println(" Ignoring Ctrl+C interruption" )
92
+ }
93
+ )
94
+ ()
95
+ }
96
+
83
97
def startServer (socketPathsOrHostPort : Either [(InetAddress , Int ), SocketPaths ]): Unit = {
84
98
val socketAndPathOrHostPort = socketPathsOrHostPort.map { socketPaths =>
85
99
val socket = libdaemonjvm.Util .serverSocketFromChannel(
You can’t perform that action at this time.
0 commit comments