Fix issue on *NIX where server dies when controlling terminal is closed (#517)

This commit is contained in:
neeshy authored and GitHub committed 2020-12-11 16:34:11 +03:00
1 parent 90b3b166e1
commit c1814c8a4e
1 file changed
+3 -1
+3 -1
View File
@@ -89,7 +89,9 @@ func init() {
} }
func detachedCommand(name string, arg ...string) *exec.Cmd { func detachedCommand(name string, arg ...string) *exec.Cmd {
return exec.Command(name, arg...) cmd := exec.Command(name, arg...)
cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
return cmd
} }
func pauseCommand() *exec.Cmd { func pauseCommand() *exec.Cmd {