Skip to content

Commit d06aa61

Browse files
zeripath6543
andcommitted
Always wait for the cmd to finish (go-gitea#14006)
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 <[email protected]> Co-authored-by: 6543 <[email protected]>
1 parent 4f296f7 commit d06aa61

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/git/command.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ func (c *Command) RunInDirTimeoutEnvFullPipelineFunc(env []string, timeout time.
153153
err := fn(ctx, cancel)
154154
if err != nil {
155155
cancel()
156+
_ = cmd.Wait()
156157
return err
157158
}
158159
}

0 commit comments

Comments
 (0)