summaryrefslogtreecommitdiff
path: root/osutil/isolate.go
blob: d4b64fb658d9e1a643a60df9ce6feea76c848017 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// +build !windows

package osutil

import (
	"os/exec"
	"syscall"
)

// IsolateProcess change gpid for the process to avoid bypassing signals to php processes.
func IsolateProcess(cmd *exec.Cmd) {
	cmd.SysProcAttr = &syscall.SysProcAttr{Setpgid: true, Pgid: 0}
}