gdb: support daemonization on windows
Этот коммит содержится в:
родитель
dcff8b6478
коммит
6e480e189d
2 изменённых файлов: 8 добавлений и 2 удалений
1
go.mod
1
go.mod
|
@ -9,6 +9,7 @@ require (
|
||||||
github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf
|
github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf
|
||||||
github.com/marcinbor85/gohex v0.0.0-20200531091804-343a4b548892
|
github.com/marcinbor85/gohex v0.0.0-20200531091804-343a4b548892
|
||||||
go.bug.st/serial v1.1.2
|
go.bug.st/serial v1.1.2
|
||||||
|
golang.org/x/sys v0.0.0-20210113181707-4bcb84eeeb78
|
||||||
golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2
|
golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2
|
||||||
tinygo.org/x/go-llvm v0.0.0-20210206225315-7fe719483a0f
|
tinygo.org/x/go-llvm v0.0.0-20210206225315-7fe719483a0f
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,10 +4,15 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
|
"syscall"
|
||||||
|
|
||||||
|
"golang.org/x/sys/windows"
|
||||||
)
|
)
|
||||||
|
|
||||||
// setCommandAsDaemon makes sure this command does not receive signals sent to
|
// 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) {
|
func setCommandAsDaemon(daemon *exec.Cmd) {
|
||||||
// Not implemented.
|
daemon.SysProcAttr = &syscall.SysProcAttr{
|
||||||
|
CreationFlags: windows.DETACHED_PROCESS,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче