summaryrefslogtreecommitdiff
path: root/libpod/container_api.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2019-12-18 09:42:01 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2019-12-19 13:33:17 -0500
commit123b8c627d53c6bd76ff4d9f6a74674341a987c0 (patch)
treee6bdf872b1264da1001a24145c4165b4b96e6527 /libpod/container_api.go
parent6b956dfd1f1071ceb40b403a9604da387979105a (diff)
downloadpodman-123b8c627d53c6bd76ff4d9f6a74674341a987c0.tar.gz
podman-123b8c627d53c6bd76ff4d9f6a74674341a987c0.tar.bz2
podman-123b8c627d53c6bd76ff4d9f6a74674341a987c0.zip
if container is not in a pid namespace, stop all processes
When a container is in a PID namespace, it is enought to send the stop signal to the PID 1 of the namespace, only send signals to all processes in the container when the container is not in a pid namespace. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r--libpod/container_api.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go
index 5168dbc68..e36623529 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -183,7 +183,7 @@ func (c *Container) StopWithTimeout(timeout uint) error {
return errors.Wrapf(define.ErrCtrStateInvalid, "can only stop created or running containers. %s is in state %s", c.ID(), c.state.State.String())
}
- return c.stop(timeout, false)
+ return c.stop(timeout)
}
// Kill sends a signal to a container
@@ -715,7 +715,7 @@ func (c *Container) Refresh(ctx context.Context) error {
// Next, if the container is running, stop it
if c.state.State == define.ContainerStateRunning {
- if err := c.stop(c.config.StopTimeout, false); err != nil {
+ if err := c.stop(c.config.StopTimeout); err != nil {
return err
}
}