Skip to content

Commit 70c161c

Browse files
committed
[v5.4-rhel] Fix: Use SIGKILL instead of SIGTERM when ExecStopContainer timeout is 0
Aligns behavior with documentation stating SIGKILL should be sent immediately if the timeout is zero. Fixes: https://issues.redhat.com/browse/RHEL-96916 Fixes: https://issues.redhat.com/browse/RHEL-96917 Signed-off-by: Jan Rodák <[email protected]> (cherry picked from commit 077649f)
1 parent ce22ca9 commit 70c161c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libpod/oci_conmon_exec_common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ func (r *ConmonOCIRuntime) ExecStopContainer(ctr *Container, sessionID string, t
250250

251251
// SIGTERM did not work. On to SIGKILL.
252252
logrus.Debugf("Killing exec session %s (PID %d) of container %s with SIGKILL", sessionID, pid, ctr.ID())
253-
if err := unix.Kill(pid, unix.SIGTERM); err != nil {
253+
if err := unix.Kill(pid, unix.SIGKILL); err != nil {
254254
if err == unix.ESRCH {
255255
return nil
256256
}

0 commit comments

Comments
 (0)