18 lines
		
	
	
		
			303 B
		
	
	
	
		
			Go
		
	
	
	
		
		
			
		
	
	
			18 lines
		
	
	
		
			303 B
		
	
	
	
		
			Go
		
	
	
	
|  | // +build linux
 | ||
|  | 
 | ||
|  | package buildah | ||
|  | 
 | ||
|  | import ( | ||
|  | 	"fmt" | ||
|  | 	"golang.org/x/sys/unix" | ||
|  | 	"os" | ||
|  | ) | ||
|  | 
 | ||
|  | func setChildProcess() error { | ||
|  | 	if err := unix.Prctl(unix.PR_SET_CHILD_SUBREAPER, uintptr(1), 0, 0, 0); err != nil { | ||
|  | 		fmt.Fprintf(os.Stderr, "prctl(PR_SET_CHILD_SUBREAPER, 1): %v\n", err) | ||
|  | 		return err | ||
|  | 	} | ||
|  | 	return nil | ||
|  | } |