summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-03-25Linux: change how kernel threads are detectedHisham Muhammad
Use the same method that ps and top use to determine if a process is a kernel thread on Linux: check if cmdline is empty. Thanks to @wangqr's investigation reported here: https://github.com/hishamhm/htop/issues/761#issuecomment-375306069 Fixes #761.
2018-03-25Fix overflow for signals >= 100.Hisham Muhammad
Thanks to @gzip4 for tracking this down. Closes #764.
2018-03-25strace: increase string lengthHisham Muhammad
2018-03-16Solaris: code indentation fixgmbroome
2018-03-16Solaris: enough changes made to justify a copyright bump to 2018Guy M. Broome
2018-03-16Solaris: fix memory allocation for usernames (some empty usernames in 32-bit ↵Guy M. Broome
builds)
2018-03-16Solaris: fix malloc() / free() issues with zone name handlingGuy M. Broome
2018-03-16Solaris: Link against libmalloc to fix various crashesGuy M. Broome
2018-03-16Solaris: Import backtrace-on-abort from Linux, with minor modification for ↵Guy M. Broome
Solaris
2018-03-16Use fork/exec instead of popen to run lsof (#757)wangqr
Fixes #675
2018-03-16Use AM_CFLAGS and AM_LDFLAGS in Makefile.am (#760)Kang-Che Sung (宋岡哲)
This reduces generated Makefile.in size by 74%. (217319 bytes -> 56326 bytes) Automake considers that <prog>_CFLAGS and <prog>_LDFLAGS are program-specific build rules, and when such are specified, Automake will generate additional code just to avoid the "generic" and package-wide AM_CFLAGS or AM_LDFLAGS. (Especially for <prog>_CFLAGS, Automake will rename generated object files to become "prog-foo.o" and such, and it's _a lot_ of code to achieve this in Makefile.) There's no reason for htop to rename intermediate object files. It's better to make things simpler. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
2018-03-02Import Solaris support (#741)gmbroome
This commit adds support for Solaris, squashed from PR #741: Summary of additions: * Initial setup of Solaris platform directory * Add Solaris platform into autoconf template * Uptime and load averages * Add dependency on libkstat * Basic process listing * Zone name display * CPU detection * Per-process memory and CPU usage parsed correctly * Uses sysconf to discover number of CPUs, instead of more complex libkstat code * Simple memory display working * Reduce repetitive calls to the PAGE_SIZE macro when reading memory info * Add Project, Contract, Task, and Pool into process properties * Use system major()/minor() implementations and remove extraneous definition of mkdev() * Get the STARTTIME column working properly, using the Linux implementation as a guide
2018-02-26Fix bashisms (#749)Jesin
The configure script relied on bash-specific extensions to shell syntax and behavior, causing build failures on systems with other /bin/sh implementations. This commit replaces those with equivalent constructs that should work in all POSIX shells.
2018-02-26Add Contributing Guide!Hisham Muhammad
2018-02-26Updates to generated header filesHisham Muhammad
2018-02-26Protect against overflows in RichString_setAttrnHisham Muhammad
2018-02-26Update ChangeLogHisham Muhammad
2018-02-26use CFLAGS from ncurses*-config, if present (#745)Michael Klein
Fixes #695.
2018-02-26Fix build failure ('major' undefined) in glibc 2.28. (#746)Kang-Che Sung (宋岡哲)
glibc 2.28 no longer defines 'major' and 'minor' in <sys/types.h> and requires us to include <sys/sysmacros.h>. (glibc 2.25 starts deprecating the macros in <sys/types.h>.) Now do include the latter if found on the system. At the moment, let's also utilize AC_HEADER_MAJOR in configure script. However as Autoconf 2.69 has not yet updated the AC_HEADER_MAJOR macro to reflect the glibc change [1], so add a workaround code. Fixes #663. Supersedes pull request #729. Reference: [1] https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=e17a30e987d7ee695fb4294a82d987ec3dc9b974 Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
2018-02-18Remove unused function from unsupported/Hisham Muhammad
2018-02-18Make settings file finding sequence more straightforwardHisham Muhammad
Avoid unnecessary access() call and make code read more linearly.
2018-02-18Only consider a read successful when the file seems validHisham Muhammad
Require at least the `fields` entry to be present, so we can have a decent guess that it was indeed a settings file.
2018-02-18Replace size_t with int/void* unionHisham Muhammad
I was occasionally passing negative values to size_t. Plus, this better reflects the intent of the variant argument. Reported by Coverity: https://scan8.coverity.com/reports.htm#v13253/p10402/fileInstanceId=22093891&defectInstanceId=7543346&mergedDefectId=174179&fileStart=251&fileEnd=500
2018-02-18linux/Battery.c: make sure fd is always closedHisham Muhammad
Detected by Coverity: https://scan8.coverity.com/reports.htm#v13252/p10402/fileInstanceId=22093957&defectInstanceId=7543348&mergedDefectId=174180
2018-02-18Fix out-of-bounds readHisham Muhammad
Detected by Coverity: https://scan8.coverity.com/reports.htm#v13252/p10402/fileInstanceId=22093847&defectInstanceId=7543344&mergedDefectId=174181
2018-02-18Fix indentationHisham Muhammad
2018-02-17Update ChangeLogHisham Muhammad
2018-02-17linux/LinuxProcessList.c: Fix indentation.Hisham Muhammad
2018-02-17call clear() function when SIGWINCH is received. (#660)guoci
2018-02-17linux/LinuxProcessList: fix reading of number of read syscalls of processMarc Kleine-Budde
The "if" tests if the character at index "5" is 'r', as a first quick check. However at index "5" will always be a colon ":". This patch fixes the off-by-one error. htop now shows proper values in the RD_SYSC column. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2018-02-17Fix preservation of LDFLAGS value during configure scriptHisham Muhammad
Fixes #738.
2018-02-17Update ChangeLogHisham Muhammad
2018-02-13Fix issue with small terminals.Hisham Muhammad
Fixes #733.
2018-02-05Optimize Vector_size on non-debug buildsHisham Muhammad
2018-02-05Handle unexpected values for character passed to isalnumHisham Muhammad
It seems that certain negative integer values can crash isalnum(). Let's protect against those. Fixes #711.
2018-02-05Check for pkgconfig's presence before using it.Hisham Muhammad
Fixes #710.
2018-02-05Fix color behavior on some terminals.Hisham Muhammad
Fixes #635.
2018-02-04Bump version to 2.1.02.1.0Hisham Muhammad
2018-02-04parseBatInfo: check `line` for NULL before passing it to String_getToken()Jan Chren (rindeal)
2018-02-04Clarify we are looking for the null terminationcoypoop
Not for a comparison to zero
2018-02-04Typo in man pageViktor Szépe
*hightlight*
2018-02-04Fix: infinite loop in tree view on macOSWataru Ashihara
Fixes #688, the bug regressed on 584a9bc. On Mac OS X 10.11.6, all processes have their parents since there's a special process named "kernel_task", whose PID and PPID are 0. As a result, `this->processes` is never changed causing infinite `while`.
2018-02-04Add support for Linux TASK_IDLEVladimir Panteleev
Linux commit 06eb61844d841d0032a9950ce7f8e783ee49c0d0 ("sched/debug: Add explicit TASK_IDLE printing") exposes kthreads idling using TASK_IDLE in procfs as "I (idle)". Until now, when sorting the STATE ("S") column, htop used the raw value of the state character for comparison, however that led to the undesirable effect of TASK_IDLE ('I') tasks being sorted above tasks that were running ('R'). Thus, explicitly recognize the idle process state, and sort it below others.
2018-02-04Darwin: disable thread reading due to bug in macOS High SierraHisham Muhammad
2018-01-23htop scans /proc to determine how many running tasks exist. Since thatLucas C. Villa Real
operation is not possible to be conducted in an atomic fashion, task scheduling effects can lead to a count greater than the number of actual processors; this is more easily noticed on machines with several CPUs and under heavy workload. This patch simply adds an upper bound on cpuCount to guarantee consistent reports of the number of running tasks at any given time.
2017-12-04Adds support for linux delay accounting (#667)André Carvalho
Adds support for showing columns with linux delay accounting. This information can be read from the netlink interface, and thus we set up a socket to read from that when initializing the LinuxProcessList (LinuxProcessList_initNetlinkSocket). After that, for each process we call LinuxProcessList_readDelayAcctData, which sends a message thru the socket after setting up a callback to get the answer from the Kernel. That callback sets the process total delay time attribute. We then set the delay percent as the percentage of time process cpu time since last scan.
2017-10-23fix fallthough comments for GCC 7.xChristian Hesse
GCC 7.x does some extended checks on fallthough for switch/case statement. The warning looks like this: warning: this statement may fall through [-Wimplicit-fallthrough=] It can be told about implicit fallthough, however it does not recognize comments within blocks, so move the comments outside.
2017-10-13Merge pull request #678 from evelikov/remove-libtoolHisham Muhammad
Remove libtool references
2017-09-22Remove libtool referencesEmil Velikov
The project builds a single standalone binary. There are no libraries created - be that static or shared ones. Thus there's no need for libtool. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-09-14Make 'c' key work with threads as well.Hisham Muhammad