summaryrefslogtreecommitdiff
path: root/server_config.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-01-05 12:21:37 +0300
committerWolfy-J <[email protected]>2019-01-05 12:21:37 +0300
commit46009112a783a1fdae95e0a061d4c8c41a1c8ff1 (patch)
treea34cf8ad465e9f354723f855c531ea1db3235cbd /server_config.go
parentd5e5be00aca87ea39ece9c04efe7dc354b1dc3f6 (diff)
first set of patches
Diffstat (limited to 'server_config.go')
-rw-r--r--server_config.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/server_config.go b/server_config.go
index 454b7992..199ce27b 100644
--- a/server_config.go
+++ b/server_config.go
@@ -75,6 +75,9 @@ func (cfg *ServerConfig) makeCommand() func() *exec.Cmd {
var cmd = strings.Split(cfg.Command, " ")
return func() *exec.Cmd {
cmd := exec.Command(cmd[0], cmd[1:]...)
+
+ cmd.SysProcAttr = &syscall.SysProcAttr{CreationFlags: syscall.CREATE_NEW_PROCESS_GROUP}
+
cmd.Env = append(os.Environ(), fmt.Sprintf("RR_RELAY=%s", cfg.Relay))
cmd.Env = append(cmd.Env, cfg.env...)
return cmd