kill: Wait for container to exit after sigkill (#1589)

Today when we send a signal we don't wait for the container to exit, as
we don't know what signals the program will actually do anything with.
However, sigkill does not fit this mold, and we should wait for the
container to exit (or be removed for --rm containers).
This commit is contained in:
Danny Canter
2026-06-02 14:26:17 -07:00
committed by GitHub
parent c7f77c285b
commit 796630258b
5 changed files with 39 additions and 18 deletions
@@ -61,12 +61,10 @@ extension Application {
containers = containerIds
}
let signalNumber = try Signal(signal).rawValue
var errors: [any Error] = []
for container in containers {
do {
try await client.kill(id: container, signal: signalNumber)
try await client.kill(id: container, signal: signal)
print(container)
} catch {
errors.append(error)