summaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-10-17 07:18:37 -0400
committerGitHub <noreply@github.com>2020-10-17 07:18:37 -0400
commit39f1bea46dbdbefb917d361726e8452e9fa5c276 (patch)
tree18b4ae331ab8900eb4a3caab594ea2bce1aab3ab /pkg/domain/infra
parent28d331d074df093f82b294d60390e5a61c68cab0 (diff)
parenteefa3cbf6ea351667ab06020347c308d082bdf2c (diff)
downloadpodman-39f1bea46dbdbefb917d361726e8452e9fa5c276.tar.gz
podman-39f1bea46dbdbefb917d361726e8452e9fa5c276.tar.bz2
podman-39f1bea46dbdbefb917d361726e8452e9fa5c276.zip
Merge pull request #8045 from andylibrian/podman-remote-cleanly-exit-on-detachkeyspressed
Update podman-remote run and start to handle detach keys
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r--pkg/domain/infra/tunnel/containers.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go
index 1bb4e68ac..eb591d23d 100644
--- a/pkg/domain/infra/tunnel/containers.go
+++ b/pkg/domain/infra/tunnel/containers.go
@@ -500,7 +500,6 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri
if err == define.ErrDetach {
// User manually detached
// Exit cleanly immediately
- report.Err = err
reports = append(reports, &report)
return reports, nil
}
@@ -573,6 +572,10 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta
// Attach
if err := startAndAttach(ic, con.ID, &opts.DetachKeys, opts.InputStream, opts.OutputStream, opts.ErrorStream); err != nil {
+ if err == define.ErrDetach {
+ return &report, nil
+ }
+
report.ExitCode = define.ExitCode(err)
if opts.Rm {
if rmErr := containers.Remove(ic.ClientCxt, con.ID, bindings.PFalse, bindings.PTrue); rmErr != nil {