summaryrefslogtreecommitdiffstats
path: root/netbsd/NetBSDProcess.c
AgeCommit message (Collapse)Author
2024-04-08Work around GCC14 memleak diagnosticBenny Baumann
While both pointers are identical, GCC-14 with -fanalyzer complains about these return statements to leak memory. The leak is only reported with LTO though.
2024-03-27Introduce autoTitleRightAlign column flagChristian Göttsche
Instead of handling PERCENT_CPU as a special case for whether to align the title of a dynamically sized column to the right or the left introduce a new flag, which can be reused by other columns.
2024-01-09Fix build in NetBSD.fraggerfox
2023-12-26Use consistent style for process field output/compare functionsBenny Baumann
2023-12-26Add includes for config.h as per the discussion in PR #1337Daniel Lange
Many thanks to @Explorer09 Kang-Che Sung (宋岡哲). Also add a #error stanza to XUtils.h in case somebody forgets the beautiful mess GNU forces on us.
2023-08-30Introduce Row and Table classes for screens beyond top-processesNathan Scott
This commit refactors the Process and ProcessList structures such they each have a new parent - Row and Table, respectively. These new classes handle screen updates relating to anything that could be represented in tabular format, e.g. cgroups, filesystems, etc, without us having to reimplement the display logic repeatedly for each new entity.
2023-05-08Introduce Machine class for host-specific info (split from ProcessList)Nathan Scott
First stage in sanitizing the process list structure so that htop can support other types of lists too (cgroups, filesystems, ...), in the not-too-distant future. This introduces struct Machine for system-wide information while keeping process-list information in ProcessList (now much less). Next step is to propogate this separation into each platform, to match these core changes.
2022-05-26Process: Display single digit precision for CPU% greater than 99.9%Kumar
Since commit edf319e[1], we're dynamically adjusting column width of "CPU%", showing single digit precision also for values greater than "99.9%" makes "CPU%" column consistent with all other values. [1]: edf319e53d1fb77546505e238d75160a3febe56e Change "Process_printPercentage()" function's logic to always display value (i.e. "val") with single precision. Except when value is greater than "99.9%" for columns like "MEM%", whose width is fixed to "4" and value cannot go beyond "100%". Credits: @Explorer09, thanks for the patch[2] to fix title alignment issue. [2]: https://github.com/htop-dev/htop/pull/959#issuecomment-1092480951 Closes: #957
2022-03-06Auto-size (normalized) CPU usage columnsBenny Baumann
2021-11-05Correct the order of xCalloc parameters in a couple of placesNathan Scott
No functional change. Thanks to @BenBE for pointing these out.
2021-10-27Dynamically scale the ST_UID size to support 32-bit UIDsSilke Hofstra
While most Unix-like systems use 16-bit user IDs, Linux supports 32-bit UIDs since version 2.6. UIDs above 65535 are used for UID namespacing of containers, where a container has its own set of 16-bit user IDs. Processes in such containers will have (much) larger UIDs than 65535. Because the current format strings for `ST_UID` and `USER` are `%5d` and `%9d` respectively, processes with such UIDs lead to misaligned columns. Dynamically scale the `ST_UID` column and increase the size of `USER` to 10 characters (length of UINT32_MAX) to ensure that the user ID always fits. Additionally: clean up how the titlebuffer size calculation and ensure the PID column has a minimum size of 5.
2021-09-22Update license headers to explicitly say GPLv2+Daniel Lange
2021-06-26Adds support for PROC_EXE and CWD.fraggerfox
2021-06-26Adds the ELAPSED column for NetBSD.fraggerfox
Additional details regarding ELAPSED column can be found in #627.
2021-06-26Implements the NetBSD specific changes for makeCommandStr refactor.fraggerfox
Refer to #388 PR for more details.
2021-06-26Fix include paths and minor whitespace issuesfraggerfox
2021-06-26Remove unwanted code, updates the commentsfraggerfox
2021-06-26Update copyright noticesBenny Baumann
2021-06-26Add NetBSD platform support without procfs dependencyfraggerfox
- TODO, clean up the code base and update comments in code.