Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Sources/swift-driver/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ do {
// to return a corresponding exit code when done.
processSet.terminate()
driverInterrupted = true

// If graceful termination doesn't work within a reasonable time, force exit
DispatchQueue.global().asyncAfter(deadline: .now() + 2.0) {
exit(1)
}
}
interruptSignalSource.resume()

Expand Down