1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// +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 }