Closed badboybeyer closed 6 years ago
I wonder if it is a good idea to use /proc
whenever it is available. Solution is up in #5 that should work on both Linux and Cygwin, but I wonder if it would break systems such as FreeBSD. Do they all have compatible /proc
? I’ll need to find out.
It looks like the BSD4.4 children use /proc/$PID/status
instead of /proc/$PID/stat
.
Maybe write the module to:
try:
proc()
except:
ps()
Urrgh! Yeah I guess I need to revise the logic. A try-except is a good idea (but probably not a bare one).
Just handle the different structures of proc
. There are only like 3 filesystems. It’s a finite space.
Okay I think we have two. What’s the third /facepalm
I decided to
We can add compatibility to more uncommon formats when someone actually wants them.
Treat cygwin like linux, because its ps command is limited and the proc file system works.
I think the "6.1" string may change a couple times a year. It may be better to do: