procutil

package
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountAllProcesses

func CountAllProcesses() (int, error)

CountAllProcesses returns the total number of running processes.

func FastProcessList

func FastProcessList() ([]*process.Process, error)

FastProcessList returns lightweight process handles for all running PIDs. Each handle only has the PID populated; attributes are fetched lazily on demand.

func IsProcessGone

func IsProcessGone(err error) bool

IsProcessGone returns true if the error indicates the process no longer exists.

func ProcessExecName

func ProcessExecName(p *process.Process) (string, error)

ProcessExecName returns the base name of the executable (without path), providing consistent cross-platform semantics with the Windows variant.

Types

type PID

type PID int32

func ReadPidFile

func ReadPidFile(path string) ([]PID, error)

ReadPidFile reads a PID from the given file and returns it as a single-element slice.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL