aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/projectatomic/buildah/run_linux.go
blob: a7519a09202d1efeaaf71de08ea23a9b18abd7c7 (plain)
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
}