diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-05-03 23:14:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-03 23:14:12 +0200 |
commit | 4aa90145bf611a7bc08ddff7e061a630154e8b40 (patch) | |
tree | 01dc345c05b6ef2c5416eb169f0388c3afb4feb1 /libpod/pod_api.go | |
parent | 2658e870d21dc03096740f17fa869463136d3fae (diff) | |
parent | d3286952e6f99b3c1f8ba177d8caddc9544adea4 (diff) | |
download | podman-4aa90145bf611a7bc08ddff7e061a630154e8b40.tar.gz podman-4aa90145bf611a7bc08ddff7e061a630154e8b40.tar.bz2 podman-4aa90145bf611a7bc08ddff7e061a630154e8b40.zip |
Merge pull request #2826 from mheon/restart_policy
Add restart policy for containers
Diffstat (limited to 'libpod/pod_api.go')
-rw-r--r-- | libpod/pod_api.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libpod/pod_api.go b/libpod/pod_api.go index 9a6baf23e..9ed5c88eb 100644 --- a/libpod/pod_api.go +++ b/libpod/pod_api.go @@ -364,6 +364,13 @@ func (p *Pod) Kill(signal uint) (map[string]error, error) { } logrus.Debugf("Killed container %s with signal %d", ctr.ID(), signal) + + ctr.state.StoppedByUser = true + if err := ctr.save(); err != nil { + ctrErrors[ctr.ID()] = err + } + + ctr.lock.Unlock() } if len(ctrErrors) > 0 { |