oci: kill all processes in a container not just the main one

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2017-10-13 14:34:51 +02:00
parent c4f7506896
commit ab2a4839d7
No known key found for this signature in database
GPG key ID: B2BEAD150DE936B9

View file

@ -553,7 +553,7 @@ func (r *Runtime) StopContainer(c *Container, timeout int64) error {
return nil return nil
} }
if err := utils.ExecCmdWithStdStreams(os.Stdin, os.Stdout, os.Stderr, r.Path(c), "kill", c.id, c.GetStopSignal()); err != nil { if err := utils.ExecCmdWithStdStreams(os.Stdin, os.Stdout, os.Stderr, r.Path(c), "kill", "--all", c.id, c.GetStopSignal()); err != nil {
return fmt.Errorf("failed to stop container %s, %v", c.id, err) return fmt.Errorf("failed to stop container %s, %v", c.id, err)
} }
if timeout == -1 { if timeout == -1 {