mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 15:07:12 +02: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:
1 parent
085924b1b3
commit
1d04e8641d
9 files changed
+44
No files matched your search
@@ -58,6 +58,7 @@ func (pm *Manager) ExecDirEnvStdIn(ctx context.Context, timeout time.Duration, d
|
||||
if stdIn != nil {
|
||||
cmd.Stdin = stdIn
|
||||
}
|
||||
SetSysProcAttribute(cmd)
|
||||
|
||||
if err := cmd.Start(); err != nil {
|
||||
return "", "", err
|
||||
|
||||
Reference in new issue
Block a user