Skip to content

Commit

Permalink
StopSignal: add a comment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
vrothberg committed Jan 19, 2023
1 parent ac47d07 commit e0f6710
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libpod/oci_conmon_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e0f6710

Please sign in to comment.