mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Always wait for the cmd to finish (#14006)
After cancelling the context we still need to wait for the command to finish otherwise zombie processes may occur Fix #13987 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: 6543 <[email protected]>
This commit is contained in:
@@ -153,6 +153,7 @@ func (c *Command) RunInDirTimeoutEnvFullPipelineFunc(env []string, timeout time.
|
||||
err := fn(ctx, cancel)
|
||||
if err != nil {
|
||||
cancel()
|
||||
_ = cmd.Wait()
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user