Skip to content

Commit

Permalink
Always wait for the cmd to finish (go-gitea#14006)
Browse files Browse the repository at this point in the history
Backport go-gitea#14006

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

Fix go-gitea#13987

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
  • Loading branch information
zeripath and 6543 committed Dec 17, 2020
1 parent 4f296f7 commit d06aa61
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 d06aa61

Please sign in to comment.