mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 00:11:04 +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:
		
					parent
					
						
							
								085924b1b3
							
						
					
				
			
			
				commit
				
					
						1d04e8641d
					
				
			
		
					 9 changed files with 44 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -102,6 +102,8 @@ func sessionHandler(session ssh.Session) {
 | 
			
		|||
	}
 | 
			
		||||
	defer stdin.Close()
 | 
			
		||||
 | 
			
		||||
	process.SetSysProcAttribute(cmd)
 | 
			
		||||
 | 
			
		||||
	wg := &sync.WaitGroup{}
 | 
			
		||||
	wg.Add(2)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue