diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2018-10-03 06:06:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-03 06:06:14 -0700 |
commit | a3c4ce6717cab56d968fbe1fff0ced19f45c23cb (patch) | |
tree | 41657a47b6edeb8ab4776eddf64cb76f59b2813c /cmd/podman/start.go | |
parent | d5687946f6a0aa14a5326f26ca0ceca68588056f (diff) | |
parent | 978aac665060140f08a5574e3611a17cc98516c0 (diff) | |
download | podman-a3c4ce6717cab56d968fbe1fff0ced19f45c23cb.tar.gz podman-a3c4ce6717cab56d968fbe1fff0ced19f45c23cb.tar.bz2 podman-a3c4ce6717cab56d968fbe1fff0ced19f45c23cb.zip |
Merge pull request #1531 from mheon/add_exited_state
Add ContainerStateExited and OCI delete() in cleanup()
Diffstat (limited to 'cmd/podman/start.go')
-rw-r--r-- | cmd/podman/start.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/podman/start.go b/cmd/podman/start.go index cb65ec6d4..a34f6df5d 100644 --- a/cmd/podman/start.go +++ b/cmd/podman/start.go @@ -81,6 +81,9 @@ func startCmd(c *cli.Context) error { } args = append(args, lastCtr.ID()) } + + ctx := getContext() + var lastError error for _, container := range args { ctr, err := runtime.LookupContainer(container) @@ -121,14 +124,14 @@ func startCmd(c *cli.Context) error { exitCode = int(ecode) } - return ctr.Cleanup() + return ctr.Cleanup(ctx) } if ctrRunning { fmt.Println(ctr.ID()) continue } // Handle non-attach start - if err := ctr.Start(getContext()); err != nil { + if err := ctr.Start(ctx); err != nil { if lastError != nil { fmt.Fprintln(os.Stderr, lastError) } |