mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
container: move channel close to its writer
let the writer of the channel close it. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -289,8 +289,8 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user, workDir
|
|||||||
chWait := make(chan error)
|
chWait := make(chan error)
|
||||||
go func() {
|
go func() {
|
||||||
chWait <- execCmd.Wait()
|
chWait <- execCmd.Wait()
|
||||||
|
close(chWait)
|
||||||
}()
|
}()
|
||||||
defer close(chWait)
|
|
||||||
|
|
||||||
pidFile := c.execPidPath(sessionID)
|
pidFile := c.execPidPath(sessionID)
|
||||||
// 60 second seems a reasonable time to wait
|
// 60 second seems a reasonable time to wait
|
||||||
|
Reference in New Issue
Block a user