mirror of
https://github.com/go-gitea/gitea
synced 2025-07-15 23:17:19 +00:00
Set Setpgid on child git processes (#19865)
When Gitea is running as PID 1 git will occassionally orphan child processes leading to (defunct) processes. This PR simply sets Setpgid to true on these child processes meaning that these defunct processes will also be correctly reaped. Fix #19077 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
@@ -157,6 +157,7 @@ func (c *Command) Run(opts *RunOpts) error {
|
||||
"GIT_NO_REPLACE_OBJECTS=1",
|
||||
)
|
||||
|
||||
process.SetSysProcAttribute(cmd)
|
||||
cmd.Dir = opts.Dir
|
||||
cmd.Stdout = opts.Stdout
|
||||
cmd.Stderr = opts.Stderr
|
||||
|
Reference in New Issue
Block a user