summaryrefslogtreecommitdiff
path: root/cmd/podman/start.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-07-12 17:10:50 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-13 14:14:42 +0000
commit35b7a875fd9747a6f322e12f358aeacea778eae5 (patch)
tree71f5e7b9d64c8b324ba6dbe805d9575ffea6520e /cmd/podman/start.go
parent299f471d1f897f173ccbbaa883b420e4c49201c9 (diff)
downloadpodman-35b7a875fd9747a6f322e12f358aeacea778eae5.tar.gz
podman-35b7a875fd9747a6f322e12f358aeacea778eae5.tar.bz2
podman-35b7a875fd9747a6f322e12f358aeacea778eae5.zip
Need to wait for container to exit before completing run/start completes
This fixes a race condition where conmon is still writing the exit file and the container is exiting. Also we should not be ignoring the -a stdin flag if the user specifies --interactive mode. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #1086 Approved by: baude
Diffstat (limited to 'cmd/podman/start.go')
-rw-r--r--cmd/podman/start.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/podman/start.go b/cmd/podman/start.go
index e917d9198..3dde306d7 100644
--- a/cmd/podman/start.go
+++ b/cmd/podman/start.go
@@ -114,7 +114,7 @@ func startCmd(c *cli.Context) error {
return errors.Wrapf(err, "unable to start container %s", ctr.ID())
}
- if ecode, err := ctr.ExitCode(); err != nil {
+ if ecode, err := ctr.Wait(); err != nil {
logrus.Errorf("unable to get exit code of container %s: %q", ctr.ID(), err)
} else {
exitCode = int(ecode)