mirror of
https://github.com/volcengine/mediakit-cli.git
synced 2026-09-14 20:06:30 +08:00
18 lines
519 B
Go
18 lines
519 B
Go
//go:build windows
|
|
|
|
package updatecheck
|
|
|
|
import "syscall"
|
|
|
|
const (
|
|
// From Windows process creation flags.
|
|
createNewProcessGroup = 0x00000200 // CREATE_NEW_PROCESS_GROUP
|
|
detachedProcess = 0x00000008 // DETACHED_PROCESS
|
|
)
|
|
|
|
// detachSysProcAttr detaches the refresh subprocess from the parent console so
|
|
// it survives the parent's exit without a window or signal propagation.
|
|
func detachSysProcAttr() *syscall.SysProcAttr {
|
|
return &syscall.SysProcAttr{CreationFlags: createNewProcessGroup | detachedProcess}
|
|
}
|