Commit Graph

1962 Commits

Author SHA1 Message Date
Daniel Lange
ba630e8ad5 Make descriptions to -shelp available so people find threads
Fixes #511
2021-02-02 10:08:59 +01:00
Daniel Lange
ef87877826 Fix typo, align with man page, drop dots 2021-02-02 10:08:59 +01:00
Daniel Lange
f3eab4e796 Explain historic naming of Light-Weight Processes column aka threads 2021-02-02 10:08:59 +01:00
Daniel Lange
de3e271206 Merge branch 'comm' of cgzones/htop
Already in Debian so making sure upstream has it, too
2021-02-02 09:56:32 +01:00
Benny Baumann
12208af777 DiD: Avoid negative cmdlineBasenameOffset 2021-02-01 22:09:39 +01:00
Daniel Lange
12f5f06e88 Check for sortTimeout to not run towards -inf
Seems to happen on Mac OS "Big Sur" (~forced application sleep)
Partial fix for #510
2021-02-01 16:02:31 +01:00
Daniel Lange
3808b3b553 Remove unused key definitions 2021-02-01 16:01:04 +01:00
BenBE
06b5828dc4
Fix Shift+Function key on Qt-based terminals
Fixes #508.
2021-02-01 09:02:36 +01:00
Christian Göttsche
8bd543562b Quote SYSCONFDIR definition
As SYSCONFDIR is a compile time string literal, use compile time string
concatenation instead of a runtime one.

Also drop related TODO, cause we indeed using the correct way of getting
$sysconfdir from autoconf
2021-01-31 21:44:34 +01:00
Christian Göttsche
06b1674aa6 Improve handling when selected last process entry
If the last process entry is selected and the process dies, stay at the
end of the list and do not jump to the start.

Also if the last entry is selected keep, after rebuilding the process
list due to a new scan, the last entry selected.
2021-01-31 21:44:00 +01:00
ahgamut
51e79ddc07 [#480] SysArchMeter to view kernel/arch info
At start, SysArchMeter calls the uname function to obtain the kernel
version and architecture. If available, the distro version is obtained
by calling lsb_release. The obtained values are stored in static
variables and used when updating the meter.
2021-01-31 20:08:09 +01:00
Christian Göttsche
7bfa466abe Linux: silence UBSAN implicit conversions
pgrp and session might be -1

linux/LinuxProcessList.c:312:20: runtime error: implicit conversion from type 'unsigned long' of value 18446744073709551615 (64-bit, unsigned) to type 'unsigned int' changed the value to 4294967295 (32-bit, unsigned)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior linux/LinuxProcessList.c:312:20 in
linux/LinuxProcessList.c:314:23: runtime error: implicit conversion from type 'unsigned long' of value 18446744073709551615 (64-bit, unsigned) to type 'unsigned int' changed the value to 4294967295 (32-bit, unsigned)
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior linux/LinuxProcessList.c:314:23 in
2021-01-30 14:21:26 +01:00
Christian Göttsche
1014e897a7 Linux: document /proc/PID/stat field parsing 2021-01-30 14:21:26 +01:00
Christian Göttsche
69efa94f9f Use String_eq wrapper instead of raw strcmp 2021-01-30 14:21:26 +01:00
Christian Göttsche
04cf590967 FreeBSD: drop minflt and implement majflt 2021-01-30 14:21:26 +01:00
Christian Göttsche
46370231e3 FreeBSD: drop unused idle thread code 2021-01-30 14:21:26 +01:00
Christian Göttsche
8c43856380 FreeBSD: populate processor field 2021-01-30 14:21:26 +01:00
Christian Göttsche
79620d01c0 FreeBSD: drop unused jail_errmsg variable 2021-01-30 14:21:26 +01:00
Christian Göttsche
399add39ca FreeBSD: simplify kernel thread logic 2021-01-30 14:21:26 +01:00
Christian Göttsche
56c4055fd1 FreeBSD: drop unused ProcessList fields 2021-01-30 14:21:26 +01:00
Christian Göttsche
fa499fc155 FreeBSD: misc 2021-01-30 14:21:26 +01:00
Christian Göttsche
fdaa15bd8d Linux: overhaul io process fields
- avoid UBSAN conversions
- print N/A on no data (i.e. as unprivileged user)
- fix rate calculation to show bytes (instead of a thousandth)
- print bytes as human number (i.e. 8MB) instead of 8388608
- stabilize sorting by adjusting NAN values to very tiny negative number
2021-01-30 14:21:26 +01:00
Christian Göttsche
fee744abd2 Update generic process field display
- sort cases by identifier
- use check snprintf
- color nice value of 0 as gray
- color cpu and memory percentages of 0.0 as gray
- color number of threads of 1 as gray
- color idle and sleeping state as gray
- color tgid matching pid (indicating main thread) as gray
2021-01-30 14:21:26 +01:00
Christian Göttsche
d5de1bc23d Overhaul sorting of state process column
Do not sort by ascii value of the state identifier, sort by relevance
2021-01-30 14:21:26 +01:00
Christian Göttsche
a3c8285237 Refactor to tty_nr process field display
If no terminal name can be found, fall back to generic display method
with major and minor device numbers.

Print special value '(none)' in case both are zero.
2021-01-30 14:21:26 +01:00
Christian Göttsche
03d6345c89 Process: document process fields
Drop unused fields 'flags' and 'exit_signal'
2021-01-30 14:21:26 +01:00
divinity76
93378b9ee5 fix typo/missing newline for --enable-static
https://i.imgur.com/byraZxG.png
2021-01-30 13:20:09 +01:00
Christian Göttsche
3acf28c259 Unsupported: pass compilation 2021-01-29 14:12:44 +01:00
Christian Göttsche
bd694c0ce6 Do not call exit(3) in signal handler
Call safe _exit(2) instead
2021-01-29 12:38:30 +01:00
Christian Göttsche
fd8c0611af Use different function on different detection method to avoid caching
Using the same function for the same library causes AC_CHECK_LIB to use
cached results.
Since we change the detection method via different or no
ncurses(5|6)-config invocation, avoid such caching by using different
functions.
2021-01-28 23:40:37 +01:00
Christian Göttsche
f27bab470b Drop duplicate option
Option subdir-objects is now define in configure.ac
2021-01-28 23:40:37 +01:00
YJ Lee
34da6fdadb Avoid syntax injection inside code block
Co-authored-by: BenBE <BenBE@geshi.org>
2021-01-28 09:21:18 +01:00
Youngjae Lee
e54a790b14 TraceScreen: draw panel header 2021-01-28 09:21:18 +01:00
Youngjae Lee
3c61813ea6 InfoScreen: add mouse wheel scroll 2021-01-28 09:21:18 +01:00
Youngjae Lee
fd45845829 InfoScreen: fix mouse selection 2021-01-28 09:21:18 +01:00
Daniel Lange
92fb69f5a0 Merge branch 'todo' of cgzones/htop
Make CRT_init get an instance of Settings instead of a separate colorScheme
2021-01-28 07:36:14 +01:00
Daniel Lange
5644d0194b Merge branch 'default_libcap' (configure overhaul) of cgzones/htop 2021-01-28 07:31:15 +01:00
Christian Göttsche
6dba60f6bd Pass Settings to CRT_init
Resolve todo
2021-01-27 17:14:15 +01:00
Christian Göttsche
211121f060 Drop invalid todo
The surrounding code has nothing to do with colors
2021-01-27 17:06:21 +01:00
Christian Göttsche
d77703b3dc ci: use as-needed linker flag in gcc full-featured build
Test whether there are any linking issues
2021-01-27 15:36:50 +01:00
Christian Göttsche
3035e29e74 Use typedef names instead of raw struct ones 2021-01-26 21:16:23 +01:00
Christian Göttsche
575edffb4b Add configure option to create static htop binary 2021-01-25 18:01:39 +01:00
Christian Göttsche
759a34039c configure: fail immediately on missing requirement 2021-01-25 17:57:21 +01:00
Christian Göttsche
38b6a0148f configure: misc modernizations
- require autoconf version 2.69
  was released in 2012 and one still can configure and build on older
  systems (just not generate the configure script)
- use modern C99 compiler check
- drop obsolete checks: AC_C_CONST, AC_FUNC_CLOSEDIR_VOID, AC_FUNC_STAT
- drop AC_HEADER_STDBOOL in favor of C99 compatibility
2021-01-25 17:57:21 +01:00
Christian Göttsche
f3623b7880 configure: reformat for improved reabability 2021-01-25 17:57:21 +01:00
Christian Göttsche
5e103ff9d1 configure: overhaul option handling
Switch Linux capabilities default from "no" to "check"

Document default settings

Use more readable formatting
2021-01-25 17:54:37 +01:00
Christian Göttsche
0f04714a03 Fix possible division by zero
Do not pass a nmemb of 0 to calloc, cause it's unportable and forbidden
with our wrapper.

Found by Coverity
2021-01-25 17:33:29 +01:00
Christian Göttsche
2ec44098f9 Allow meters in text mode to span empty neighbors to the right
Closes: #484
2021-01-23 15:20:47 +01:00
Daniel Lange
6f6e0ec571 Update copyright for 2021 2021-01-22 20:06:51 +01:00
Daniel Lange
d269d7247f Merge branch 'mop-up-sort-mess' of fasterit/htop 2021-01-22 16:26:42 +01:00