2 Commits

Author SHA1 Message Date
Paweł Gronowski
98d4cd6551 daemon: Pass context through container kill operations
Drop cancellation at the kill boundary because killing starts
irreversible task and cleanup work that must finish after request
cancellation.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-07-27 19:11:36 +02:00
Paweł Gronowski
f3d1fb5fa9 daemon/kill: Preserve indefinite delayed-exit waits
The container API supports a negative StopTimeout, conventionally -1, to
wait indefinitely without forcefully terminating the container.

The delayed-exit path passed this value to context.WithTimeout, which
expired immediately and triggered fallback exit handling before the real
exit event could be processed.

Use a cancel-only context for negative timeouts so this path preserves
the existing API contract.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-07-22 20:57:12 +02:00