fix(executor/local): wait after kill
This commit is contained in:
parent
33d26be20c
commit
a53cb6451e
|
@ -27,6 +27,9 @@ func (e *Local) generateResult(
|
|||
ExitStatus: processState.ExitCode(),
|
||||
Error: "",
|
||||
Time: func() uint64 {
|
||||
if isTimeout {
|
||||
return 0
|
||||
}
|
||||
nanos := processState.UserTime().Nanoseconds()
|
||||
if nanos < 0 {
|
||||
return 0
|
||||
|
@ -148,8 +151,9 @@ func (e *Local) Run(cmds []stage.Cmd) ([]stage.ExecutorResult, error) {
|
|||
results = append(results, result)
|
||||
case <-time.After(duration):
|
||||
_ = execCmd.Process.Kill()
|
||||
err := execCmd.Wait()
|
||||
result := e.generateResult(
|
||||
nil,
|
||||
err,
|
||||
execCmd.ProcessState,
|
||||
duration,
|
||||
cmd,
|
||||
|
|
Loading…
Reference in New Issue
Block a user