summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-05-20 19:40:59 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-05-20 19:41:02 +0200
commitf86bb561efea8b639a2711ea4798d071b2180e29 (patch)
tree4e8e7b994b748108224bf994af38a3ce136205a3 /libpod
parent57e781462c5f93fcdd37ffd8e2d5ebdb0c6ca27e (diff)
downloadpodman-f86bb561efea8b639a2711ea4798d071b2180e29.tar.gz
podman-f86bb561efea8b639a2711ea4798d071b2180e29.tar.bz2
podman-f86bb561efea8b639a2711ea4798d071b2180e29.zip
container: move channel close to its writer
let the writer of the channel close it. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_api.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go
index 06a31da11..eff5bfe5f 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -289,8 +289,8 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user, workDir
chWait := make(chan error)
go func() {
chWait <- execCmd.Wait()
+ close(chWait)
}()
- defer close(chWait)
pidFile := c.execPidPath(sessionID)
// 60 second seems a reasonable time to wait