summaryrefslogtreecommitdiff
path: root/pkg/adapter/containers.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2019-11-04 14:37:14 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2019-11-05 14:10:43 -0500
commit7c623bd41ff3d53412531343a94e4fa5fead759f (patch)
treecc4b904f5a5c2fcfb5388c502125f5416e821ab2 /pkg/adapter/containers.go
parenta904e21cf0213185fd115683dc2adc4baeff922a (diff)
downloadpodman-7c623bd41ff3d53412531343a94e4fa5fead759f.tar.gz
podman-7c623bd41ff3d53412531343a94e4fa5fead759f.tar.bz2
podman-7c623bd41ff3d53412531343a94e4fa5fead759f.zip
Allow users to disable detach keys
If user specifies --detach-keys="", this will disable the feature. Adding define.DefaultDetachKeys to help screen to help identify detach keys. Updated man pages with additonal information. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/adapter/containers.go')
-rw-r--r--pkg/adapter/containers.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go
index 64550f545..a09466243 100644
--- a/pkg/adapter/containers.go
+++ b/pkg/adapter/containers.go
@@ -400,17 +400,8 @@ func (r *LocalRuntime) Run(ctx context.Context, c *cliconfig.RunValues, exitCode
}
}
- config, err := r.Runtime.GetConfig()
- if err != nil {
- return exitCode, err
- }
- detachKeys := c.String("detach-keys")
- if detachKeys == "" {
- detachKeys = config.DetachKeys
- }
-
// if the container was created as part of a pod, also start its dependencies, if any.
- if err := StartAttachCtr(ctx, ctr, outputStream, errorStream, inputStream, detachKeys, c.Bool("sig-proxy"), true, c.IsSet("pod")); err != nil {
+ if err := StartAttachCtr(ctx, ctr, outputStream, errorStream, inputStream, c.String("detach-keys"), c.Bool("sig-proxy"), true, c.IsSet("pod")); err != nil {
// We've manually detached from the container
// Do not perform cleanup, or wait for container exit code
// Just exit immediately