Fixed a test related to wait

This commit is contained in:
Diptanu Choudhury 2016-02-04 10:21:33 -08:00
parent e5595fd8cb
commit 7e3041e2ee
1 changed files with 1 additions and 1 deletions

View File

@ -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 {