mirror of https://github.com/containers/podman.git
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 <hony.com@seznam.cz>
This commit is contained in:
parent
499ea1168b
commit
077649f9d0
|
|
@ -258,7 +258,7 @@ func (r *ConmonOCIRuntime) ExecStopContainer(ctr *Container, sessionID string, t
|
|||
|
||||
// SIGTERM did not work. On to SIGKILL.
|
||||
logrus.Debugf("Killing exec session %s (PID %d) of container %s with SIGKILL", sessionID, pid, ctr.ID())
|
||||
if err := pidHandle.Kill(unix.SIGTERM); err != nil {
|
||||
if err := pidHandle.Kill(unix.SIGKILL); err != nil {
|
||||
if err == unix.ESRCH {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue