Always wait for the cmd to finish (#14006) (#14039)

Backport #14006

After cancelling the context we still need to wait for the
command to finish otherwise zombie processes may occur

Fix #13987
pull/14031/head^2
zeripath 4 years ago committed by GitHub
parent 4f296f7436
commit b8a2cd9f40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      modules/git/command.go

@ -153,6 +153,7 @@ func (c *Command) RunInDirTimeoutEnvFullPipelineFunc(env []string, timeout time.
err := fn(ctx, cancel) err := fn(ctx, cancel)
if err != nil { if err != nil {
cancel() cancel()
_ = cmd.Wait()
return err return err
} }
} }

Loading…
Cancel
Save