diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2019-12-18 09:42:01 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2019-12-19 13:33:17 -0500 |
commit | 123b8c627d53c6bd76ff4d9f6a74674341a987c0 (patch) | |
tree | e6bdf872b1264da1001a24145c4165b4b96e6527 /libpod/container_api.go | |
parent | 6b956dfd1f1071ceb40b403a9604da387979105a (diff) | |
download | podman-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.go | 4 |
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 } } |