safegit v0.26.0 /internal/procutil
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 go
func ProcessAlive(pid int) bool

ProcessAlive 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 go
func ProcessAlive(pid int) bool

ProcessAlive 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.

Search