1314227863
`!windows` was being used as the synonym for `darwin dragonfly freebsd linux netbsd openbsd solaris`. While I don't imagine `android` will be a prime target for Nomad in the near term, favor explicit build targets. List of build targets generated by Go 1.7's dist command: `go tool dist list | sort | cut -d '/' -f 1 | sort | uniq`
19 lines
454 B
Go
19 lines
454 B
Go
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
|
|
|
|
package driver
|
|
|
|
import (
|
|
"os/exec"
|
|
"syscall"
|
|
)
|
|
|
|
// isolateCommand sets the setsid flag in exec.Cmd to true so that the process
|
|
// becomes the process leader in a new session and doesn't receive signals that
|
|
// are sent to the parent process.
|
|
func isolateCommand(cmd *exec.Cmd) {
|
|
if cmd.SysProcAttr == nil {
|
|
cmd.SysProcAttr = &syscall.SysProcAttr{}
|
|
}
|
|
cmd.SysProcAttr.Setsid = true
|
|
}
|