summaryrefslogtreecommitdiffstats
path: root/Process.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix build failure ('major' undefined) in glibc 2.28. (#746)Kang-Che Sung (宋岡哲)2018-02-261-0/+6
| | | | | | | | | | | | | | | | | 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>
* Replace size_t with int/void* unionHisham Muhammad2018-02-181-2/+2
| | | | | | | | 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
* Add support for Linux TASK_IDLEVladimir Panteleev2018-02-041-1/+3
| | | | | | | | | | | | | | 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.
* Make 'c' key work with threads as well.Hisham Muhammad2017-09-141-0/+2
|
* Security review: check results of snprintf.Hisham Muhammad2017-07-271-32/+32
| | | | | Calls marked with xSnprintf shouldn't fail. Abort program cleanly if any of them does.
* Security review: make privilege dropping-restoring optional.Hisham Muhammad2017-07-261-6/+4
| | | | | | | This is/was necessary only on macOS, because you needed root in order to read the process list. This was never necessary on Linux, and it also raises security concerns, so now it needs to be enabled explicitly at build time.
* Add "no perm" status when other fields fail due to lack of permission.Hisham Muhammad2017-07-101-1/+4
| | | | | Thanks @Sworddragon for the heads up. See #88.
* Replace all uses of sprintf with snprintfTomasz Kramkowski2016-12-291-1/+1
| | | | | | | | | | | | In all the cases where sprintf was being used within htop, snprintf could have been used. This patch replaces all uses of sprintf with snprintf which makes sure that if a buffer is too small to hold the resulting string, the string is simply cut short instead of causing a buffer overflow which leads to undefined behaviour. `sizeof(variable)` was used in these cases, as opposed to `sizeof variable` which is my personal preference because `sizeof(variable)` was already used in one way or another in other parts of the code.
* Interpret TTY_NR column on Linux,Hisham2016-10-011-1/+2
| | | | | translate dev_t to major:minor on other platforms. Closes #316.
* Fix column misalignment for priority -101 threadsIvan Kozik2016-09-061-1/+1
| | | | | | BFS-patched kernels can have kernel threads with priority -101. This change makes priority -101 display as "RT", just like priority -100. Related: https://github.com/hishamhm/htop/issues/314
* Let's keep it simple then!Hisham2016-06-201-1/+1
|
* While we're at it, get rid of another sprintf.Hisham2016-06-191-1/+1
|
* Silence cast warning.Hisham2016-05-301-0/+1
|
* Silence warnings about seteuid return value.Hisham2016-05-251-4/+4
| | | | Closes #483.
* Fix a small undefined behavior detected by libubsan.Hisham2016-05-041-1/+1
|
* Catch invalid IO values due to no permissions.Hisham2016-02-201-1/+4
| | | | Display them properly. Not fully convinced of the "no perm" message...
* Support -1 as tpgidHisham2016-02-101-2/+2
|
* Reuse comm object if possible, avoid useless repetitions of free+strdup.Hisham2016-02-021-0/+1
|
* drop privileges before changing process priority or sending signalsMichael Klein2015-12-071-11/+12
| | | | - replaces uid check from d18e9a4895599a479df264a6c7380b8805abb434
* add some security checks when running SUID rootMichael Klein2015-12-021-6/+11
| | | | | | on Darwin, htop needs to run with root privileges to display information about other users processes. This commit makes running htop SUID root a bit more safe.
* Make column width calculation dynamic.Hisham Muhammad2015-08-201-4/+26
| | | | Closes #228.
* Rename String to StringUtils.David Hunt2015-08-191-1/+1
| | | | | | | | | Fixes building on case-insensitive filesystems where String.h gets confused with <string.h>. From d734dacea0a10d0465dad4e95b3421511e7da112 Mon Sep 17 00:00:00 2001 From: David Hunt <dhunt@iolanthe.attlocal.net> Date: Sat, 11 Jul 2015 20:56:31 -0500 Subject: [PATCH 1/8] Rename String to StringUtils
* New setting: "Show program path"Tobias Geerinckx-Rice2015-08-071-16/+24
| | | | | | | | | Add a setting to hide all but the last component from the programme path, leaving only the "basename". Makes htop more usable on smaller screens, or systems with longer than average paths. Off by default. "Highlight program basename" will still be respected, to further visually separate process names from their arguments.
* added missing defines for androidsherpya2015-05-201-0/+5
|
* Merge branch 'master' into wipHisham Muhammad2015-04-021-10/+21
|\ | | | | | | | | | | | | | | | | | | Conflicts: Process.c Process.h htop.c linux/LinuxProcess.c linux/LinuxProcess.h test_spec.lua
| * Fixes to subclassing Process.Hisham Muhammad2015-03-311-8/+20
| |
| * Tempus fugit.Hisham Muhammad2015-03-211-1/+1
| |
| * Merge fixesHisham Muhammad2015-02-231-3/+1
| |
| * Fix allocation of processes. Closes #166.Hisham Muhammad2015-02-231-7/+4
| | | | | | | | | | | | | | | | | | Conflicts: Process.c Process.h ProcessList.c ScreenManager.c linux/LinuxProcessList.c
* | Tempus fugit.Hisham Muhammad2015-03-231-1/+1
| | | | | | | | | | | | Conflicts: htop.c htop.h
* | Major advances in FreeBSD port.Hisham Muhammad2015-03-161-13/+14
| |
* | Isolate portable and Linux-specific process fields.Hisham Muhammad2015-03-161-224/+119
| |
* | Move more Linux-specific code into Linux subdir.Hisham Muhammad2015-03-151-153/+6
| |
* | Fix allocation of processes. Closes #166.Hisham Muhammad2015-02-201-7/+2
| |
* | Sorry about the mega-patch.Hisham Muhammad2015-01-211-195/+140
|/ | | | | This is a work-in-progress, code is currently broken. (Some actions, and notably, the header, are missing.)
* Move "get max pid" code into platform specific area.Hisham Muhammad2014-11-271-6/+4
|
* Builds on Linux again!Hisham Muhammad2014-11-241-1/+0
|
* Changes for supporting separate platform subdirectories.Hisham Muhammad2014-11-241-45/+3
|
* Fixed a wrong attribution.Valmiky Arquissandas2014-10-141-2/+0
|
* Added new color for 'D' state.Valmiky Arquissandas2014-10-141-3/+10
|
* Update values for fields whose columns may appear later. Fixes #80.Hisham Muhammad2014-05-031-2/+2
|
* Make VPID use PID-width format. Closes #79.Hisham Muhammad2014-05-031-3/+9
|
* Compare with long, for 64-bit systemsHisham Muhammad2014-04-251-2/+2
|
* Merge branch 'master' of https://github.com/hishamhm/htopHisham Muhammad2014-04-251-2/+6
|\
| * Support pagefaults stats. Closes #45.Hisham Muhammad2014-04-241-2/+6
| |
* | Fix time-based sortingHisham Muhammad2014-04-251-5/+5
|/
* Boost field buffer size - crashes when trying to draw very deep UTF-8 treesHisham Muhammad2014-04-241-1/+1
| | | | | Test by nesting 30 shells Patch from ArchLinux. Closes #65.
* Better consistency in coloring. Closes #66.Hisham Muhammad2014-04-241-41/+59
| | | | For now rates won't be colored gray when zero; I'll think about that.
* Both IO_PRIO and IO_RATE had the same column heading. Closes #61.Hisham Muhammad2014-04-241-1/+1
|
* Use proper format string for unsigned data.Hisham Muhammad2014-04-211-3/+3
|

© 2014-2024 Faster IT GmbH | imprint | privacy policy