3 ms·
> depends on having a unix filesystem. It doesn't do that. Before the multiplatform changes it did depend on having procfs (linux's I assume since BSDs had a n
by masklinn 11y ago
> depends on having a unix filesystem.
It doesn't do that. Before the multiplatform changes it did depend on having procfs (linux's I assume since BSDs had a non-identical procfs yet weren't supported), aside from the OSX fork which ripped out all the /proc access and replaced them with OSX API calls.
What it does depend on is ncurses.
- kajecounterhack 11y agoAh, thanks for the correction. I had no idea it wasn't using procfs anymore, or that darwin was using something very different. TIL :)
- masklinn 11y ago> I had no idea it wasn't using procfs anymore It still uses procfs for Linux (since that's there by default), but not for the other ports. Consider Platform_getLoadAverage for instance: * linux uses /proc/loadavg[0] * freebsd and openbsd use sysctl({CTL_VM, VM_LOADAVG})[1][2] * OSX uses getloadavg(3)[3] [0] https://github.com/hishamhm/htop/blob/master/linux/Platform.c#L143 https://github.com/hishamhm/htop/blob/master/linux/Platform.... [1] https://github.com/hishamhm/htop/blob/master/freebsd/Platform.c#L123 https://github.com/hishamhm/htop/blob/master/freebsd/Platfor... [2] https://github.com/hishamhm/htop/blob/master/openbsd/Platform.c#L181 https://github.com/hishamhm/htop/blob/master/openbsd/Platfor... [3] https://github.com/hishamhm/htop/blob/master/darwin/Platform.c#L144 https://github.com/hishamhm/htop/blob/master/darwin/Platform...