summaryrefslogtreecommitdiff
path: root/cmd/podman/attach.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-03-16 10:34:32 -0400
committerGitHub <noreply@github.com>2018-03-16 10:34:32 -0400
commitd7acfb478e5e5e6ac344d18c1a65ab81996fd8b2 (patch)
treec1a335e5a2291e8447e8f9f4c4ef02e7cde2fd0c /cmd/podman/attach.go
parent2f533888a5adcbfb57ec22a8086aa5e76acb9071 (diff)
parentcd73a6904d3dc91f305c7415ab7bada8a976d815 (diff)
downloadpodman-d7acfb478e5e5e6ac344d18c1a65ab81996fd8b2.tar.gz
podman-d7acfb478e5e5e6ac344d18c1a65ab81996fd8b2.tar.bz2
podman-d7acfb478e5e5e6ac344d18c1a65ab81996fd8b2.zip
Merge pull request #447 from mheon/sig_proxy
Add signal proxying to podman run and attach
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())
}