File tree Expand file tree Collapse file tree
Services/ContainerSandboxService/Server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import PackageDescription
2323let releaseVersion = ProcessInfo . processInfo. environment [ " RELEASE_VERSION " ] ?? " 0.0.0 "
2424let gitCommit = ProcessInfo . processInfo. environment [ " GIT_COMMIT " ] ?? " unspecified "
2525let builderShimVersion = " 0.12.0 "
26- let scVersion = " 0.31 .0 "
26+ let scVersion = " 0.32 .0 "
2727
2828let package = Package (
2929 name: " container " ,
Original file line number Diff line number Diff line change 1717import ArgumentParser
1818import ContainerAPIClient
1919import ContainerResource
20+ import Containerization
2021import ContainerizationError
2122import ContainerizationOS
2223import Darwin
@@ -60,7 +61,7 @@ extension Application {
6061 containers = containerIds
6162 }
6263
63- let signalNumber = try Signals . parseSignal ( signal)
64+ let signalNumber = try Signal ( signal) . rawValue
6465
6566 var errors : [ any Error ] = [ ]
6667 for container in containers {
Original file line number Diff line number Diff line change 1717import ArgumentParser
1818import ContainerAPIClient
1919import ContainerResource
20+ import Containerization
2021import ContainerizationError
2122import ContainerizationOS
2223import Foundation
@@ -67,7 +68,7 @@ extension Application {
6768
6869 let opts = ContainerStopOptions (
6970 timeoutInSeconds: self . time,
70- signal: try Signals . parseSignal ( self . signal)
71+ signal: try Signal ( self . signal) . rawValue
7172 )
7273 try await Self . stopContainers (
7374 client: client,
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import ArgumentParser
1818import ContainerAPIClient
1919import ContainerPlugin
2020import ContainerResource
21+ import Containerization
2122import ContainerizationOS
2223import Foundation
2324import Logging
@@ -65,7 +66,7 @@ extension Application {
6566 log. info ( " stopping containers " , metadata: [ " stopTimeoutSeconds " : " \( Self . stopTimeoutSeconds) " ] )
6667 do {
6768 let containers = try await client. list ( ) . map { $0. id }
68- let signal = try Signals . parseSignal ( " SIGTERM " )
69+ let signal = Signal . term . rawValue
6970 let opts = ContainerStopOptions ( timeoutInSeconds: Self . stopTimeoutSeconds, signal: signal)
7071 try await ContainerStop . stopContainers (
7172 client: client,
Original file line number Diff line number Diff line change @@ -541,12 +541,12 @@ public actor SandboxService {
541541 guard let proc = processInfo. process else {
542542 throw ContainerizationError ( . invalidState, message: " process \( id) not started " )
543543 }
544- try await proc. kill ( Int32 ( try message. signal ( ) ) )
544+ try await proc. kill ( Signal ( rawValue : Int32 ( try message. signal ( ) ) ) )
545545 return message. reply ( )
546546 }
547547
548548 // TODO: fix underlying signal value to int64
549- try await ctr. container. kill ( Int32 ( try message. signal ( ) ) )
549+ try await ctr. container. kill ( Signal ( rawValue : Int32 ( try message. signal ( ) ) ) )
550550 return message. reply ( )
551551 default:
552552 throw ContainerizationError (
@@ -1095,9 +1095,9 @@ public actor SandboxService {
10951095 try await lc. wait ( )
10961096 }
10971097 group. addTask {
1098- try await lc. kill ( stopOpts. signal)
1098+ try await lc. kill ( Signal ( rawValue : stopOpts. signal) )
10991099 try await Task . sleep ( for: . seconds( stopOpts. timeoutInSeconds) )
1100- try await lc. kill ( SIGKILL )
1100+ try await lc. kill ( . kill )
11011101
11021102 return ExitStatus ( exitCode: 137 )
11031103 }
You can’t perform that action at this time.
0 commit comments