fleet/cmd/fleetctl/fleetctl/kill_process_windows.go
Victor Lyuboslavsky 2db0959c15
Moved fleetctl to fleetctl package. (#28932)
For #28932

No functional changes.

Left the parent directory (also named fleetctl) with the main package as
is not to break/change any other flows.

This PR is the first step before refactoring integration tests to speed
up (parallelize) fleetctl tests.
2025-05-07 15:53:35 -05:00

14 lines
229 B
Go

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