Fixed a test related to wait
This commit is contained in:
parent
e5595fd8cb
commit
7e3041e2ee
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue