diff options
author | zeripath <art27@cantab.net> | 2020-12-17 11:50:21 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-17 12:50:21 +0100 |
commit | 80a299d307bd3135eb3fb2f5e2deba600f0698ae (patch) | |
tree | ba6c4188c6ddcb53f6397b18608850a0d24bcc51 /modules/git/command.go | |
parent | 5e09de174c69c77babf7366cbbb17d59cb3102f0 (diff) | |
download | gitea-80a299d307bd3135eb3fb2f5e2deba600f0698ae.tar.gz gitea-80a299d307bd3135eb3fb2f5e2deba600f0698ae.zip |
Always wait for the cmd to finish (#14006)
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 <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'modules/git/command.go')
-rw-r--r-- | modules/git/command.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/git/command.go b/modules/git/command.go index d40c0bfa23..c9d1732416 100644 --- a/modules/git/command.go +++ b/modules/git/command.go @@ -153,6 +153,7 @@ func (c *Command) RunInDirTimeoutEnvFullPipelineFunc(env []string, timeout time. err := fn(ctx, cancel) if err != nil { cancel() + _ = cmd.Wait() return err } } |