github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/util_windows.go (about) 1 package main 2 3 // This file contains utility functions for Windows. 4 5 import ( 6 "os/exec" 7 "syscall" 8 9 "golang.org/x/sys/windows" 10 ) 11 12 // setCommandAsDaemon makes sure this command does not receive signals sent to 13 // the parent. 14 func setCommandAsDaemon(daemon *exec.Cmd) { 15 daemon.SysProcAttr = &syscall.SysProcAttr{ 16 CreationFlags: windows.DETACHED_PROCESS, 17 } 18 }