LinuxContainer/LinuxProcess: Have wait return ExitStatus (#300)

Have wait return a struct containing the exit code and the time at which
the process actually exited. This is useful so higher level tools (like
container) don't need to craft a date themselves, and it will be more
accurate as it's taken in the guest directly after the process exits.
This commit is contained in:
Danny Canter
2025-09-29 14:09:37 -04:00
committed by GitHub
parent 511dd59e19
commit 82f2d887dd
14 changed files with 100 additions and 39 deletions
@@ -57,7 +57,7 @@ public protocol VirtualMachineAgent: Sendable {
func startProcess(id: String, containerID: String?) async throws -> Int32
func signalProcess(id: String, containerID: String?, signal: Int32) async throws
func resizeProcess(id: String, containerID: String?, columns: UInt32, rows: UInt32) async throws
func waitProcess(id: String, containerID: String?, timeoutInSeconds: Int64?) async throws -> Int32
func waitProcess(id: String, containerID: String?, timeoutInSeconds: Int64?) async throws -> ExitStatus
func deleteProcess(id: String, containerID: String?) async throws
func closeProcessStdin(id: String, containerID: String?) async throws