summaryrefslogtreecommitdiff
path: root/cmd/podman/start.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/start.go')
-rw-r--r--cmd/podman/start.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/cmd/podman/start.go b/cmd/podman/start.go
index c90fab645..366d5c3fc 100644
--- a/cmd/podman/start.go
+++ b/cmd/podman/start.go
@@ -25,6 +25,10 @@ var (
Name: "interactive, i",
Usage: "Keep STDIN open even if not attached",
},
+ cli.BoolFlag{
+ Name: "sig-proxy",
+ Usage: "proxy received signals to the process",
+ },
LatestFlag,
}
startDescription = `
@@ -60,6 +64,10 @@ func startCmd(c *cli.Context) error {
return err
}
+ if c.Bool("sig-proxy") && !attach {
+ return errors.Wrapf(libpod.ErrInvalidArg, "you cannot use sig-proxy without --attach")
+ }
+
runtime, err := getRuntime(c)
if err != nil {
return errors.Wrapf(err, "error creating libpod runtime")
@@ -106,6 +114,10 @@ func startCmd(c *cli.Context) error {
return errors.Wrapf(err, "unable to start container %s", ctr.ID())
}
+ if c.Bool("sig-proxy") {
+ ProxySignals(ctr)
+ }
+
// Wait for attach to complete
err = <-attachChan
if err != nil {