From 7e3041e2eebd7cfce933b6425cad525cf1ef914d Mon Sep 17 00:00:00 2001 From: Diptanu Choudhury Date: Thu, 4 Feb 2016 10:21:33 -0800 Subject: [PATCH] Fixed a test related to wait --- client/driver/plugins/executor.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/driver/plugins/executor.go b/client/driver/plugins/executor.go index 2106caf71..209536900 100644 --- a/client/driver/plugins/executor.go +++ b/client/driver/plugins/executor.go @@ -117,6 +117,7 @@ func (e *UniversalExecutor) Wait() (*ProcessState, error) { } func (e *UniversalExecutor) wait() { + defer close(e.processExited) err := e.cmd.Wait() if err == nil { e.exitState = &ProcessState{Pid: 0, ExitCode: 0, Time: time.Now()} @@ -135,7 +136,6 @@ func (e *UniversalExecutor) wait() { e.destroyCgroup() } e.exitState = &ProcessState{Pid: 0, ExitCode: exitCode, Time: time.Now()} - close(e.processExited) } func (e *UniversalExecutor) Exit() error {