diff options
author | sago35 <[email protected]> | 2021-03-01 08:13:47 +0900 |
---|---|---|
committer | Ayke <[email protected]> | 2021-03-04 14:46:10 +0100 |
commit | 6e480e189d1b66bbc80000a8bd4eeda19211ddf8 (patch) | |
tree | 8293268281a5abd5ea6c1bd747b951eeccecae92 /util_windows.go | |
parent | dcff8b64789e65d0b42e9d73f67133c83a2998f2 (diff) | |
download | tinygo-6e480e189d1b66bbc80000a8bd4eeda19211ddf8.tar.gz tinygo-6e480e189d1b66bbc80000a8bd4eeda19211ddf8.zip |
gdb: support daemonization on windows
Diffstat (limited to 'util_windows.go')
-rw-r--r-- | util_windows.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/util_windows.go b/util_windows.go index 848c7b1f5..51cc3e4e4 100644 --- a/util_windows.go +++ b/util_windows.go @@ -4,10 +4,15 @@ package main import ( "os/exec" + "syscall" + + "golang.org/x/sys/windows" ) // setCommandAsDaemon makes sure this command does not receive signals sent to -// the parent. It is unimplemented on Windows. +// the parent. func setCommandAsDaemon(daemon *exec.Cmd) { - // Not implemented. + daemon.SysProcAttr = &syscall.SysProcAttr{ + CreationFlags: windows.DETACHED_PROCESS, + } } |