Skip to content

Commit 5f1d731

Browse files
authored
Merge pull request #495 from nkcsgexi/74292387
Ignore interruption signal sent from the build system
2 parents f5a9401 + 5e7e6eb commit 5f1d731

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Sources/swift-driver/main.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ let diagnosticsEngine = DiagnosticsEngine(handlers: [Driver.stderrDiagnosticsHan
2222
do {
2323
let processSet = ProcessSet()
2424
intHandler = try InterruptHandler {
25-
processSet.terminate()
26-
// If the swift-driver invocation is interrupted by the build system,
27-
// returning non-zero value emits red-herring error messages in the build logs.
28-
// So we exit with 0 here.
29-
exit(0)
25+
// Ignore the interruption signal.
26+
// The underlying swift compiler isn't ready to be safely interrupted yet and
27+
// interrupting them may cause red-herring build failures that may pollute the build
28+
// log.
3029
}
3130

3231
if ProcessEnv.vars["SWIFT_ENABLE_EXPLICIT_MODULE"] != nil {

0 commit comments

Comments
 (0)