//go:build windows package windows import "syscall" // IsProcessRunning checks if a process with the given PID exists on Windows. func IsProcessRunning(pid int) bool { const PROCESS_QUERY_LIMITED_INFORMATION = 0x1000 handle, err := syscall.OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, false, uint32(pid)) if err != nil { return false } syscall.CloseHandle(handle) return true }