Updated
On this page
Package procutil provides cross-platform process liveness checks.
#internal/procutil
#internal/procutil
Package procutil provides cross-platform process liveness checks.
#ProcessAlive
go
func ProcessAlive(pid int) boolProcessAlive checks if a process with the given PID exists. Returns true if the process is alive (including cases where we lack permission to signal it).
#ProcessAlive
go
func ProcessAlive(pid int) boolProcessAlive checks if a process with the given PID exists. Uses OpenProcess with PROCESS_QUERY_LIMITED_INFORMATION (least-privilege access right) to probe whether the process handle is obtainable.