Files
2026-07-01 00:47:28 +08:00

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}
}