Files
talk/internal/daemon/spawn_unix.go
T

14 lines
279 B
Go
Raw Normal View History

//go:build unix
package daemon
import (
"os/exec"
"syscall"
)
// detach detaches the child from the terminal: own session (no SIGHUP when
// the terminal closes, no Ctrl-C from the shell).
func detach(cmd *exec.Cmd) {
cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
}