mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-05 21:20:06 +00:00
📦 [agent v0.3.7] fix: cross compile
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
// +build windows
|
||||
|
||||
package utils
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"unsafe"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
@@ -42,8 +44,8 @@ func (g ProcessExitGroup) Dispose() error {
|
||||
return windows.CloseHandle(windows.Handle(g))
|
||||
}
|
||||
|
||||
func (g ProcessExitGroup) AddProcess(p *os.Process) error {
|
||||
func (g ProcessExitGroup) AddProcess(cmd *exec.Cmd) error {
|
||||
return windows.AssignProcessToJobObject(
|
||||
windows.Handle(g),
|
||||
windows.Handle((*process)(unsafe.Pointer(p)).Handle))
|
||||
windows.Handle((*process)(unsafe.Pointer(cmd.Process)).Handle))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user