Repository navigation
Releases
Releases · pborman/ps
Add Fds, Cwd, and process tree / correctness fixes.
Process now has Fds() (open file descriptors and paths) and Cwd() (working directory). GetProcessMap returns (*ProcessMap, error). GetDescendants is the correctly spelled form of GetDecendents.
This also tightens ESRCH handling, uses RSS for linux Footprint, and fixes empty /proc cmdline panics and darwin RUsage error caching.
Add support for listing the children of a process.
The Process structure now contains a Children []*Process field. This field is filled in by calling Process(true) or by using the new function GetProcessMap. Below is an example for fetching child information.
pm := ProcessMap() // fetch all process information
p := pm.Pids[pid] // get the Process structure for pid
childProcesses := p.Children // p.Children is a slice of *Process
children := pm.GetChildren() // get list of children's pids
dependents := pm.GetDecendents() // get list of all decendents pids
Beta release
v0.1.0 Make our error returns be ESRCH and EPERM