From e0f671007d82f81a7a1236ceabb90c58007133c3 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 19 Jan 2023 10:59:23 +0100 Subject: [PATCH] StopSignal: add a comment Add a comment when SIGKILL is being used. It may help future readers better comprehend what's going on and why. [NO NEW TESTS NEEDED] - cannot test a comment :^) Signed-off-by: Valentin Rothberg --- libpod/oci_conmon_common.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libpod/oci_conmon_common.go b/libpod/oci_conmon_common.go index 9b95772b83..23ee52cf8a 100644 --- a/libpod/oci_conmon_common.go +++ b/libpod/oci_conmon_common.go @@ -427,6 +427,8 @@ func (r *ConmonOCIRuntime) StopContainer(ctr *Container, timeout uint, all bool) } } + // If the timeout was set to 0 or if stopping the container with the + // specified signal did not work, use the big hammer with SIGKILL. if err := r.KillContainer(ctr, uint(unix.SIGKILL), all); err != nil { // Ignore the error if KillContainer complains about it already // being stopped or exited. There's an inherent race with the