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"
|
"regexp"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
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:])
|
msg := fmt.Sprintf("env vars: %s; command: '%s'; args: %s\n", envVars, elements[cmdIdx], elements[1+cmdIdx:])
|
||||||
log.Info(msg)
|
log.Info(msg)
|
||||||
|
|
||||||
|
cmd.SysProcAttr = &syscall.SysProcAttr {
|
||||||
|
Setsid: true,
|
||||||
|
}
|
||||||
|
|
||||||
cmd.Start()
|
cmd.Start()
|
||||||
|
|
||||||
if *resident {
|
if *resident {
|
||||||
|
|||||||
Reference in New Issue
Block a user