Some work on supporting Windows
This commit is contained in:
parent
a8f5af7bd0
commit
2f1d4ae60d
9 changed files with 109 additions and 19 deletions
19
vm/os_specifics_windows.go
Normal file
19
vm/os_specifics_windows.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// go:build windows
|
||||
|
||||
package vm
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func prepareVMCmd(cmd *exec.Cmd) {
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||
CreationFlags: syscall.CREATE_NEW_PROCESS_GROUP,
|
||||
}
|
||||
}
|
||||
|
||||
func terminateProcess(pid int) error {
|
||||
return exec.Command("TASKKILL", "/T", "/F", "/PID", fmt.Sprint(pid)).Run()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue