github.com/huiliang/nomad@v0.2.1-0.20151124023127-7a8b664699ff/command/spawn_daemon_unix.go (about) 1 // +build !windows 2 3 package command 4 5 import "syscall" 6 7 // isolateCmd sets the session id for the process and the umask. 8 func (c *SpawnDaemonCommand) isolateCmd() error { 9 if c.config.Cmd.SysProcAttr == nil { 10 c.config.Cmd.SysProcAttr = &syscall.SysProcAttr{} 11 } 12 13 c.config.Cmd.SysProcAttr.Setsid = true 14 syscall.Umask(0) 15 return nil 16 }