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:
nightly-brew
2022-01-15 02:36:07 +01:00
parent 4ea160e524
commit 07821f39b7

View File

@@ -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 {