aboutsummaryrefslogtreecommitdiffhomepage
path: root/util_windows.go
diff options
context:
space:
mode:
authorsago35 <[email protected]>2021-03-01 08:13:47 +0900
committerAyke <[email protected]>2021-03-04 14:46:10 +0100
commit6e480e189d1b66bbc80000a8bd4eeda19211ddf8 (patch)
tree8293268281a5abd5ea6c1bd747b951eeccecae92 /util_windows.go
parentdcff8b64789e65d0b42e9d73f67133c83a2998f2 (diff)
downloadtinygo-6e480e189d1b66bbc80000a8bd4eeda19211ddf8.tar.gz
tinygo-6e480e189d1b66bbc80000a8bd4eeda19211ddf8.zip
gdb: support daemonization on windows
Diffstat (limited to 'util_windows.go')
-rw-r--r--util_windows.go9
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,
+ }
}