NewProc returns a process for the given pid under /proc.
(pid int)
| 57 | |
| 58 | // NewProc returns a process for the given pid under /proc. |
| 59 | func NewProc(pid int) (Proc, error) { |
| 60 | fs, err := NewFS(DefaultMountPoint) |
| 61 | if err != nil { |
| 62 | return Proc{}, err |
| 63 | } |
| 64 | return fs.Proc(pid) |
| 65 | } |
| 66 | |
| 67 | // AllProcs returns a list of all currently available processes under /proc. |
| 68 | func AllProcs() (Procs, error) { |