File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,13 @@ extension Process {
38
38
}
39
39
return try await waitUntilExit ( )
40
40
} onCancel: {
41
+ logger. debug ( " Terminating process using SIGINT because task was cancelled: \( self . arguments) " )
41
42
signal ( SIGINT)
42
43
Task {
43
44
// Give the process 2 seconds to react to a SIGINT. If that doesn't work, terminate the process.
44
45
try await Task . sleep ( for: . seconds( 2 ) )
45
46
if !hasExited. value {
47
+ logger. debug ( " Terminating process using SIGKILL because it did not honor SIGINT: \( self . arguments) " )
46
48
// TODO: We should also terminate all child processes (https://github.com/swiftlang/sourcekit-lsp/issues/2080)
47
49
#if os(Windows)
48
50
// Windows does not define SIGKILL. Process.signal sends a `terminate` to the underlying Foundation process
You can’t perform that action at this time.
0 commit comments