go-ps
go-ps copied to clipboard
Add netbsd support via mount_procfs(8)
This PR adds NetBSD support via mount_procfs(8).
Completely based on Linux one.
(It would be probably better to avoid mount_procfs(8) because on some setup it can be not present (i.e. procfs is optional) but that's a possible starting point in order to make go-ps working on NetBSD too!)
Here a complete transcript of corresponding go test -v:
$ go test -v
=== RUN TestFindProcess
--- PASS: TestFindProcess (0.00s)
=== RUN TestProcesses
--- PASS: TestProcesses (0.01s)
=== RUN TestUnixProcess_impl
--- PASS: TestUnixProcess_impl (0.00s)
PASS
ok github.com/mitchellh/go-ps 0.013s