summaryrefslogtreecommitdiff
path: root/cmd/podman/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/utils.go')
-rw-r--r--cmd/podman/utils.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/podman/utils.go b/cmd/podman/utils.go
index 925674474..cf0047db9 100644
--- a/cmd/podman/utils.go
+++ b/cmd/podman/utils.go
@@ -1,6 +1,7 @@
package main
import (
+ "fmt"
"os"
gosignal "os/signal"
@@ -161,7 +162,7 @@ func startAttachCtr(ctr *libpod.Container, stdout, stderr, stdin *os.File, detac
streams.AttachInput = false
}
- attachChan, err := ctr.StartAndAttach(streams, detachKeys, resize)
+ attachChan, err := ctr.StartAndAttach(getContext(), streams, detachKeys, resize)
if err != nil {
return err
}
@@ -170,6 +171,10 @@ func startAttachCtr(ctr *libpod.Container, stdout, stderr, stdin *os.File, detac
ProxySignals(ctr)
}
+ if stdout == nil && stderr == nil {
+ fmt.Printf("%s\n", ctr.ID())
+ }
+
err = <-attachChan
if err != nil {
return errors.Wrapf(err, "error attaching to container %s", ctr.ID())