Use Setsid when starting the selected program to make sure it's not killed by signals sent to the drawer's process group.
This commit is contained in:
5
tools.go
5
tools.go
@@ -15,6 +15,7 @@ import (
|
||||
"regexp"
|
||||
"sort"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
@@ -578,6 +579,10 @@ func launch(command string, terminal bool) {
|
||||
msg := fmt.Sprintf("env vars: %s; command: '%s'; args: %s\n", envVars, elements[cmdIdx], elements[1+cmdIdx:])
|
||||
log.Info(msg)
|
||||
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr {
|
||||
Setsid: true,
|
||||
}
|
||||
|
||||
cmd.Start()
|
||||
|
||||
if *resident {
|
||||
|
||||
Reference in New Issue
Block a user