Skip to content

Commit ed67755

Browse files
committed
Always wait for the cmd to finish
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]>
1 parent b8c58ed commit ed67755

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)