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 <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2023-01-19 10:59:23 +01:00
parent ac47d07194
commit e0f671007d

View File

@ -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