Michael McConville
e595f6865e
Rename variable for consistency
...
Suggested by Hisham.
2016-01-04 16:20:51 -05:00
Michael McConville
198592a0f1
Plug mem leak, improve CPU enumeration logic
...
I think this leak may still exist in the FreeBSD port.
2016-01-03 16:56:33 -05:00
Michael McConville
918cfd54d6
Fall back to sysctl's command name, and a bugfix
...
This is what OpenBSD's top(1) does when the libkvm call fails, and it's
a good idea.
This commit also fixes process name construction. The space was being
written one character too far.
2016-01-02 22:05:20 -05:00
Michael McConville
3da36bbc61
Use dynamically allocated memory for process names
...
Even when they're constant, as is the case for zombie processes.
2016-01-02 17:11:23 -05:00
Michael McConville
c1b3289219
Check for allocation failure
...
Pointed out by Michael Reed.
2016-01-02 12:20:40 -05:00
Michael McConville
ae5c01f485
Use err() rather then errx() for sysctl()
...
So that we can see errno. Pointed out by Michael Reed.
2016-01-02 12:17:35 -05:00
Michael McConville
22cfda6332
OpenBSD fixes and updates
...
I forgot how awful the process name logic was. It was an initial hack to
get it running, and I forgot to clean it up.
I also had to change a few includes and error function uses.
2016-01-02 11:57:53 -05:00
Michael McConville
cd3d2337f8
Replace all err.h function uses with CRT_fatalError(). Failing with
...
err.h functions corrupts the terminal when using curses.
2015-11-01 13:26:57 -05:00
Michael McConville
8673a84e5f
Remove some trailing whitespace
2015-10-13 11:05:52 -04:00
Michael McConville
6a21d2f3a6
Fix enumeratoin of on-CPU processes in OpenBSD
2015-09-19 12:45:22 -04:00
Michael McConville
ad1a0ad08d
Replace some remaining tabs
2015-09-19 12:21:22 -04:00
Michael McConville
e2bbd5cfa4
Change some tabs to three spaces
2015-09-19 12:08:34 -04:00
Michael McConville
a9a5a539cf
(Very) initial working OpenBSD port
2015-09-18 00:46:48 -04:00