fleet/cmd/fleetctl/kill_process_windows.go
Tomas Touceda b11c6ffe31
Download and launch orbit for the current device when starting preview (#2437)
* Download and launch orbit for the current device when starting preview

* Add windows kill

* Fix imports

* Fix import

* Disable secure directory checks on windows for now

* Add missing import
2021-10-15 18:23:06 -03:00

15 lines
210 B
Go

//go:build windows
// +build windows
package main
import (
"os/exec"
"strconv"
)
func killPID(pid int) error {
kill := exec.Command("taskkill", "/T", "/F", "/PID", strconv.Itoa(pid))
return kill.Run()
}