Files
ctrld/cmd/cli/self_upgrade_others.go
Cuong Manh Le c6365e6b74 cmd/cli: handle stop signal from service manager
So using "ctrld stop" or service manager to stop ctrld will end up with
the same result, stopped ctrld with a working DNS, and deactivation pin
code will always have effects if set.
2025-03-26 23:18:36 +07:00

13 lines
281 B
Go

//go:build !windows
package cli
import (
"syscall"
)
// sysProcAttrForDetachedChildProcess returns *syscall.SysProcAttr instance for running a detached child command.
func sysProcAttrForDetachedChildProcess() *syscall.SysProcAttr {
return &syscall.SysProcAttr{Setsid: true}
}