mirror of
https://github.com/containers/podman.git
synced 2025-06-22 18:08:11 +08:00
Merge pull request #14765 from giuseppe/unpause-before-kill
runtime: unpause the container before killing it
This commit is contained in:
@ -664,9 +664,6 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force, remo
|
||||
}
|
||||
|
||||
if c.state.State == define.ContainerStatePaused {
|
||||
if err := c.ociRuntime.KillContainer(c, 9, false); err != nil {
|
||||
return err
|
||||
}
|
||||
isV2, err := cgroups.IsCgroup2UnifiedMode()
|
||||
if err != nil {
|
||||
return err
|
||||
@ -677,6 +674,9 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force, remo
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := c.ociRuntime.KillContainer(c, 9, false); err != nil {
|
||||
return err
|
||||
}
|
||||
// Need to update container state to make sure we know it's stopped
|
||||
if err := c.waitForExitFileAndSync(); err != nil {
|
||||
return err
|
||||
|
Reference in New Issue
Block a user