summaryrefslogtreecommitdiff
path: root/cmd/podman/attach.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-03-04 12:24:56 -0500
committerMatthew Heon <matthew.heon@gmail.com>2018-03-15 16:00:20 -0400
commitcd73a6904d3dc91f305c7415ab7bada8a976d815 (patch)
treef801bda8d9b6eb4726f1c6c41d33cd877d5246ff /cmd/podman/attach.go
parent647fedc2a2bc84a3e199ae86d5a7c6608d3968cc (diff)
downloadpodman-cd73a6904d3dc91f305c7415ab7bada8a976d815.tar.gz
podman-cd73a6904d3dc91f305c7415ab7bada8a976d815.tar.bz2
podman-cd73a6904d3dc91f305c7415ab7bada8a976d815.zip
Add signal proxying to podman run, start, and attach
Also removes sig-proxy from 'podman create', where is does not make sense. Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'cmd/podman/attach.go')
-rw-r--r--cmd/podman/attach.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/podman/attach.go b/cmd/podman/attach.go
index 7f7e4d192..20c1c306d 100644
--- a/cmd/podman/attach.go
+++ b/cmd/podman/attach.go
@@ -16,6 +16,10 @@ var (
Name: "no-stdin",
Usage: "Do not attach STDIN. The default is false.",
},
+ cli.BoolTFlag{
+ Name: "sig-proxy",
+ Usage: "proxy received signals to the process (default true)",
+ },
LatestFlag,
}
attachDescription = "The podman attach command allows you to attach to a running container using the container's ID or name, either to view its ongoing output or to control it interactively."
@@ -63,6 +67,10 @@ func attachCmd(c *cli.Context) error {
return errors.Errorf("you can only attach to running containers")
}
+ if c.BoolT("sig-proxy") {
+ ProxySignals(ctr)
+ }
+
if err := ctr.Attach(c.Bool("no-stdin"), c.String("detach-keys")); err != nil {
return errors.Wrapf(err, "error attaching to container %s", ctr.ID())
}