Skip to content

Commit

Permalink
Always wait for the cmd to finish (#14006)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
zeripath and 6543 authored Dec 17, 2020
1 parent 5e09de1 commit 80a299d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/git/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ func (c *Command) RunInDirTimeoutEnvFullPipelineFunc(env []string, timeout time.
err := fn(ctx, cancel)
if err != nil {
cancel()
_ = cmd.Wait()
return err
}
}
Expand Down

0 comments on commit 80a299d

Please sign in to comment.