Skip to content

Commit 077649f

Browse files
committed
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. Signed-off-by: Jan Rodák <[email protected]>
1 parent 499ea11 commit 077649f

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
@@ -258,7 +258,7 @@ func (r *ConmonOCIRuntime) ExecStopContainer(ctr *Container, sessionID string, t
258258

259259
// SIGTERM did not work. On to SIGKILL.
260260
logrus.Debugf("Killing exec session %s (PID %d) of container %s with SIGKILL", sessionID, pid, ctr.ID())
261-
if err := pidHandle.Kill(unix.SIGTERM); err != nil {
261+
if err := pidHandle.Kill(unix.SIGKILL); err != nil {
262262
if err == unix.ESRCH {
263263
return nil
264264
}

0 commit comments

Comments
 (0)