aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2021-10-15 09:03:04 +0200
committerDaniel Lange <DLange@git.local>2021-10-15 09:03:04 +0200
commit30ce3b4c264c51c98f280e88e23792ff7deb2317 (patch)
treef9730c54ab9d86ce57ce636f2fba1fdc03f46072
parent69f439eff387a6ecb52734e400b297a3c85f2285 (diff)
downloaddebian_htop-upstream/3.1.1.tar.gz
debian_htop-upstream/3.1.1.tar.bz2
debian_htop-upstream/3.1.1.zip
New upstream version 3.1.1upstream/3.1.1
-rw-r--r--Action.c4
-rw-r--r--Action.h2
-rw-r--r--Affinity.c2
-rw-r--r--Affinity.h2
-rw-r--r--AffinityPanel.c2
-rw-r--r--AffinityPanel.h2
-rw-r--r--AvailableColumnsPanel.c2
-rw-r--r--AvailableColumnsPanel.h2
-rw-r--r--AvailableMetersPanel.c2
-rw-r--r--AvailableMetersPanel.h2
-rw-r--r--BatteryMeter.c2
-rw-r--r--BatteryMeter.h2
-rw-r--r--CPUMeter.c2
-rw-r--r--CPUMeter.h2
-rw-r--r--CRT.c79
-rw-r--r--CRT.h8
-rw-r--r--CategoriesPanel.c2
-rw-r--r--CategoriesPanel.h2
-rw-r--r--ChangeLog18
-rw-r--r--ClockMeter.c2
-rw-r--r--ClockMeter.h2
-rw-r--r--ColorsPanel.c2
-rw-r--r--ColorsPanel.h2
-rw-r--r--ColumnsPanel.c2
-rw-r--r--ColumnsPanel.h2
-rw-r--r--CommandLine.c4
-rw-r--r--CommandLine.h2
-rw-r--r--Compat.c2
-rw-r--r--Compat.h2
-rw-r--r--DateMeter.c2
-rw-r--r--DateMeter.h2
-rw-r--r--DateTimeMeter.c2
-rw-r--r--DateTimeMeter.h2
-rw-r--r--DiskIOMeter.c2
-rw-r--r--DiskIOMeter.h2
-rw-r--r--DisplayOptionsPanel.c2
-rw-r--r--DisplayOptionsPanel.h2
-rw-r--r--DynamicColumn.c2
-rw-r--r--DynamicMeter.c2
-rw-r--r--FunctionBar.c2
-rw-r--r--FunctionBar.h2
-rw-r--r--Hashtable.c2
-rw-r--r--Hashtable.h2
-rw-r--r--Header.c2
-rw-r--r--Header.h2
-rw-r--r--HeaderLayout.h2
-rw-r--r--HeaderOptionsPanel.c2
-rw-r--r--HeaderOptionsPanel.h2
-rw-r--r--HostnameMeter.c2
-rw-r--r--HostnameMeter.h2
-rw-r--r--IncSet.c4
-rw-r--r--IncSet.h2
-rw-r--r--ListItem.c2
-rw-r--r--ListItem.h2
-rw-r--r--LoadAverageMeter.c2
-rw-r--r--LoadAverageMeter.h2
-rw-r--r--MainPanel.c12
-rw-r--r--MainPanel.h2
-rw-r--r--Makefile.am24
-rw-r--r--MemoryMeter.c4
-rw-r--r--MemoryMeter.h2
-rw-r--r--MemorySwapMeter.c2
-rw-r--r--MemorySwapMeter.h2
-rw-r--r--Meter.c2
-rw-r--r--Meter.h2
-rw-r--r--MetersPanel.c2
-rw-r--r--MetersPanel.h2
-rw-r--r--Object.c2
-rw-r--r--Object.h2
-rw-r--r--OpenFilesScreen.c2
-rw-r--r--OpenFilesScreen.h2
-rw-r--r--OptionItem.c2
-rw-r--r--OptionItem.h2
-rw-r--r--Panel.c6
-rw-r--r--Panel.h4
-rw-r--r--Process.c8
-rw-r--r--Process.h2
-rw-r--r--ProcessList.c2
-rw-r--r--ProcessList.h2
-rw-r--r--ProcessLocksScreen.c2
-rw-r--r--ProcessLocksScreen.h2
-rw-r--r--ProvideCurses.h2
-rw-r--r--README6
-rw-r--r--RichString.c2
-rw-r--r--RichString.h2
-rw-r--r--ScreenManager.c2
-rw-r--r--ScreenManager.h2
-rw-r--r--Settings.c58
-rw-r--r--Settings.h4
-rw-r--r--SignalsPanel.c2
-rw-r--r--SignalsPanel.h2
-rw-r--r--SwapMeter.c2
-rw-r--r--SwapMeter.h2
-rw-r--r--SysArchMeter.c2
-rw-r--r--SysArchMeter.h2
-rw-r--r--TasksMeter.c2
-rw-r--r--TasksMeter.h2
-rw-r--r--TraceScreen.c2
-rw-r--r--TraceScreen.h2
-rw-r--r--UptimeMeter.c2
-rw-r--r--UptimeMeter.h2
-rw-r--r--UsersTable.c2
-rw-r--r--UsersTable.h2
-rw-r--r--Vector.c2
-rw-r--r--Vector.h2
-rw-r--r--XUtils.c2
-rw-r--r--XUtils.h2
-rw-r--r--configure.ac42
-rw-r--r--darwin/DarwinProcess.c4
-rw-r--r--darwin/DarwinProcess.h3
-rw-r--r--darwin/DarwinProcessList.c46
-rw-r--r--darwin/DarwinProcessList.h2
-rw-r--r--darwin/Platform.c14
-rw-r--r--darwin/Platform.h2
-rw-r--r--darwin/PlatformHelpers.c125
-rw-r--r--darwin/PlatformHelpers.h40
-rw-r--r--darwin/ProcessField.h2
-rw-r--r--docs/styleguide.md8
-rw-r--r--dragonflybsd/DragonFlyBSDProcess.c2
-rw-r--r--dragonflybsd/DragonFlyBSDProcess.h2
-rw-r--r--dragonflybsd/DragonFlyBSDProcessList.c5
-rw-r--r--dragonflybsd/DragonFlyBSDProcessList.h2
-rw-r--r--dragonflybsd/Platform.c2
-rw-r--r--dragonflybsd/Platform.h2
-rw-r--r--dragonflybsd/ProcessField.h2
-rw-r--r--freebsd/FreeBSDProcess.c2
-rw-r--r--freebsd/FreeBSDProcess.h2
-rw-r--r--freebsd/FreeBSDProcessList.c4
-rw-r--r--freebsd/FreeBSDProcessList.h2
-rw-r--r--freebsd/Platform.c4
-rw-r--r--freebsd/Platform.h2
-rw-r--r--freebsd/ProcessField.h2
-rw-r--r--generic/gettime.c2
-rw-r--r--generic/gettime.h2
-rw-r--r--generic/hostname.c2
-rw-r--r--generic/hostname.h2
-rw-r--r--generic/openzfs_sysctl.c2
-rw-r--r--generic/openzfs_sysctl.h2
-rw-r--r--generic/uname.c2
-rw-r--r--generic/uname.h2
-rw-r--r--htop.1.in11
-rw-r--r--htop.c2
-rw-r--r--linux/HugePageMeter.c2
-rw-r--r--linux/HugePageMeter.h2
-rw-r--r--linux/IOPriority.h2
-rw-r--r--linux/IOPriorityPanel.c2
-rw-r--r--linux/IOPriorityPanel.h2
-rw-r--r--linux/LinuxProcess.c2
-rw-r--r--linux/LinuxProcess.h2
-rw-r--r--linux/LinuxProcessList.c16
-rw-r--r--linux/LinuxProcessList.h2
-rw-r--r--linux/Platform.c6
-rw-r--r--linux/Platform.h2
-rw-r--r--linux/PressureStallMeter.c2
-rw-r--r--linux/PressureStallMeter.h2
-rw-r--r--linux/ProcessField.h2
-rw-r--r--linux/SELinuxMeter.c2
-rw-r--r--linux/SELinuxMeter.h2
-rw-r--r--linux/SystemdMeter.c2
-rw-r--r--linux/SystemdMeter.h2
-rw-r--r--netbsd/NetBSDProcess.c2
-rw-r--r--netbsd/NetBSDProcess.h2
-rw-r--r--netbsd/NetBSDProcessList.c4
-rw-r--r--netbsd/NetBSDProcessList.h2
-rw-r--r--netbsd/Platform.c2
-rw-r--r--netbsd/Platform.h2
-rw-r--r--netbsd/ProcessField.h2
-rw-r--r--openbsd/OpenBSDProcess.c2
-rw-r--r--openbsd/OpenBSDProcess.h2
-rw-r--r--openbsd/OpenBSDProcessList.c4
-rw-r--r--openbsd/OpenBSDProcessList.h2
-rw-r--r--openbsd/Platform.c2
-rw-r--r--openbsd/Platform.h2
-rw-r--r--openbsd/ProcessField.h2
-rw-r--r--pcp-htop.c2
-rw-r--r--pcp/PCPDynamicColumn.c2
-rw-r--r--pcp/PCPDynamicMeter.c2
-rw-r--r--pcp/PCPMetric.c7
-rw-r--r--pcp/PCPMetric.h2
-rw-r--r--pcp/PCPProcess.c2
-rw-r--r--pcp/PCPProcess.h2
-rw-r--r--pcp/PCPProcessList.c5
-rw-r--r--pcp/PCPProcessList.h2
-rw-r--r--pcp/Platform.c2
-rw-r--r--pcp/Platform.h2
-rw-r--r--pcp/ProcessField.h2
-rw-r--r--scripts/htop_suppressions.valgrind10
-rw-r--r--solaris/Platform.c2
-rw-r--r--solaris/Platform.h2
-rw-r--r--solaris/ProcessField.h2
-rw-r--r--solaris/SolarisProcess.c2
-rw-r--r--solaris/SolarisProcess.h2
-rw-r--r--solaris/SolarisProcessList.c2
-rw-r--r--solaris/SolarisProcessList.h2
-rw-r--r--unsupported/Platform.c2
-rw-r--r--unsupported/Platform.h2
-rw-r--r--unsupported/ProcessField.h2
-rw-r--r--unsupported/UnsupportedProcess.c2
-rw-r--r--unsupported/UnsupportedProcess.h2
-rw-r--r--unsupported/UnsupportedProcessList.c2
-rw-r--r--unsupported/UnsupportedProcessList.h2
-rw-r--r--zfs/ZfsArcMeter.c2
-rw-r--r--zfs/ZfsArcMeter.h2
-rw-r--r--zfs/ZfsArcStats.h2
-rw-r--r--zfs/ZfsCompressedArcMeter.c2
-rw-r--r--zfs/ZfsCompressedArcMeter.h2
206 files changed, 628 insertions, 317 deletions
diff --git a/Action.c b/Action.c
index 1d373ef..07e21dc 100644
--- a/Action.c
+++ b/Action.c
@@ -1,7 +1,7 @@
/*
htop - Action.c
(C) 2015 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -519,7 +519,7 @@ static Htop_Reaction actionHelp(State* st) {
int line = 0;
mvaddstr(line++, 0, "htop " VERSION " - " COPYRIGHT);
- mvaddstr(line++, 0, "Released under the GNU GPLv2. See 'man' page for more info.");
+ mvaddstr(line++, 0, "Released under the GNU GPLv2+. See 'man' page for more info.");
attrset(CRT_colors[DEFAULT_COLOR]);
line++;
diff --git a/Action.h b/Action.h
index 4a59072..e1d14e4 100644
--- a/Action.h
+++ b/Action.h
@@ -3,7 +3,7 @@
/*
htop - Action.h
(C) 2015 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Affinity.c b/Affinity.c
index c1e73cc..dc6a7fb 100644
--- a/Affinity.c
+++ b/Affinity.c
@@ -2,7 +2,7 @@
htop - Affinity.c
(C) 2004-2011 Hisham H. Muhammad
(C) 2020 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Affinity.h b/Affinity.h
index cf08cce..5e7bfe2 100644
--- a/Affinity.h
+++ b/Affinity.h
@@ -4,7 +4,7 @@
htop - Affinity.h
(C) 2004-2011 Hisham H. Muhammad
(C) 2020 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/AffinityPanel.c b/AffinityPanel.c
index d50d554..9875a5c 100644
--- a/AffinityPanel.c
+++ b/AffinityPanel.c
@@ -1,7 +1,7 @@
/*
htop - AffinityPanel.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/AffinityPanel.h b/AffinityPanel.h
index 183e447..87b1b85 100644
--- a/AffinityPanel.h
+++ b/AffinityPanel.h
@@ -3,7 +3,7 @@
/*
htop - AffinityPanel.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/AvailableColumnsPanel.c b/AvailableColumnsPanel.c
index 08cbb17..7720bef 100644
--- a/AvailableColumnsPanel.c
+++ b/AvailableColumnsPanel.c
@@ -1,7 +1,7 @@
/*
htop - AvailableColumnsPanel.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/AvailableColumnsPanel.h b/AvailableColumnsPanel.h
index 828f7e6..aca5906 100644
--- a/AvailableColumnsPanel.h
+++ b/AvailableColumnsPanel.h
@@ -3,7 +3,7 @@
/*
htop - AvailableColumnsPanel.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/AvailableMetersPanel.c b/AvailableMetersPanel.c
index c00aec1..ae289ec 100644
--- a/AvailableMetersPanel.c
+++ b/AvailableMetersPanel.c
@@ -1,7 +1,7 @@
/*
htop - AvailableMetersPanel.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/AvailableMetersPanel.h b/AvailableMetersPanel.h
index 5d77c5d..f5f7a2d 100644
--- a/AvailableMetersPanel.h
+++ b/AvailableMetersPanel.h
@@ -3,7 +3,7 @@
/*
htop - AvailableMetersPanel.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/BatteryMeter.c b/BatteryMeter.c
index 26a5ac4..33d17b7 100644
--- a/BatteryMeter.c
+++ b/BatteryMeter.c
@@ -1,7 +1,7 @@
/*
htop - BatteryMeter.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
diff --git a/BatteryMeter.h b/BatteryMeter.h
index fa6d503..d0818b7 100644
--- a/BatteryMeter.h
+++ b/BatteryMeter.h
@@ -3,7 +3,7 @@
/*
htop - BatteryMeter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
diff --git a/CPUMeter.c b/CPUMeter.c
index 28fb730..9974db9 100644
--- a/CPUMeter.c
+++ b/CPUMeter.c
@@ -1,7 +1,7 @@
/*
htop - CPUMeter.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/CPUMeter.h b/CPUMeter.h
index 6dbf815..7f2ddb1 100644
--- a/CPUMeter.h
+++ b/CPUMeter.h
@@ -3,7 +3,7 @@
/*
htop - CPUMeter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/CRT.c b/CRT.c
index 2533f61..ce59994 100644
--- a/CRT.c
+++ b/CRT.c
@@ -1,7 +1,7 @@
/*
htop - CRT.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -21,14 +21,22 @@ in the source distribution for its full text.
#include "ProvideCurses.h"
#include "XUtils.h"
-#ifdef HAVE_EXECINFO_H
-#include <execinfo.h>
-#endif
-
#if !defined(NDEBUG) && defined(HAVE_MEMFD_CREATE)
#include <sys/mman.h>
#endif
+#if defined(HAVE_LIBUNWIND_H) && defined(HAVE_LIBUNWIND)
+# define PRINT_BACKTRACE
+# define UNW_LOCAL_ONLY
+# include <libunwind.h>
+# if defined(HAVE_DLADDR)
+# include <dlfcn.h>
+# endif
+#elif defined(HAVE_EXECINFO_H)
+# define PRINT_BACKTRACE
+# include <execinfo.h>
+#endif
+
#define ColorIndex(i,j) ((7-(i))*8+(j))
@@ -1008,6 +1016,59 @@ void CRT_setColors(int colorScheme) {
CRT_colors = CRT_colorSchemes[colorScheme];
}
+#ifdef PRINT_BACKTRACE
+static void print_backtrace(void) {
+#if defined(HAVE_LIBUNWIND_H) && defined(HAVE_LIBUNWIND)
+ unw_context_t context;
+ unw_getcontext(&context);
+
+ unw_cursor_t cursor;
+ unw_init_local(&cursor, &context);
+
+ unsigned int item = 0;
+
+ while (unw_step(&cursor) > 0) {
+ unw_word_t pc;
+ unw_get_reg(&cursor, UNW_REG_IP, &pc);
+ if (pc == 0)
+ break;
+
+ char symbolName[256] = "?";
+ unw_word_t offset = 0;
+ unw_get_proc_name(&cursor, symbolName, sizeof(symbolName), &offset);
+
+ unw_proc_info_t pip;
+ pip.unwind_info = NULL;
+
+ const char* fname = "?";
+ const void* ptr = 0;
+ if (unw_get_proc_info(&cursor, &pip) == 0) {
+ ptr = (const void*)(pip.start_ip + offset);
+
+ #ifdef HAVE_DLADDR
+ Dl_info dlinfo;
+ if (dladdr(ptr, &dlinfo) && dlinfo.dli_fname && *dlinfo.dli_fname)
+ fname = dlinfo.dli_fname;
+ #endif
+ }
+
+ const char* frame = "";
+ if (unw_is_signal_frame(&cursor) > 0)
+ frame = "{signal frame}";
+
+ fprintf(stderr, "%2u: %#14lx %s (%s+%#lx) [%p]%s%s\n", item++, pc, fname, symbolName, offset, ptr, frame ? " " : "", frame);
+ }
+#elif defined(HAVE_EXECINFO_H)
+ void* backtraceArray[256];
+
+ size_t size = backtrace(backtraceArray, ARRAYSIZE(backtraceArray));
+ backtrace_symbols_fd(backtraceArray, size, STDERR_FILENO);
+#else
+#error No implementation for print_backtrace()!
+#endif
+}
+#endif
+
void CRT_handleSIGSEGV(int signal) {
CRT_done();
@@ -1022,7 +1083,7 @@ void CRT_handleSIGSEGV(int signal) {
" - Likely steps to reproduce (How did it happen?)\n"
);
-#ifdef HAVE_EXECINFO_H
+#ifdef PRINT_BACKTRACE
fprintf(stderr, " - Backtrace of the issue (see below)\n");
#endif
@@ -1048,16 +1109,14 @@ void CRT_handleSIGSEGV(int signal) {
Settings_write(CRT_crashSettings, true);
fprintf(stderr, "\n\n");
-#ifdef HAVE_EXECINFO_H
+#ifdef PRINT_BACKTRACE
fprintf(stderr,
"Backtrace information:\n"
"----------------------\n"
);
- void* backtraceArray[256];
+ print_backtrace();
- size_t size = backtrace(backtraceArray, ARRAYSIZE(backtraceArray));
- backtrace_symbols_fd(backtraceArray, size, STDERR_FILENO);
fprintf(stderr,
"\n"
"To make the above information more practical to work with, "
diff --git a/CRT.h b/CRT.h
index f2c2c22..c437e65 100644
--- a/CRT.h
+++ b/CRT.h
@@ -3,7 +3,7 @@
/*
htop - CRT.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -147,9 +147,9 @@ void CRT_fatalError(const char* note) ATTR_NORETURN;
void CRT_handleSIGSEGV(int signal) ATTR_NORETURN;
-#define KEY_WHEELUP KEY_F(20)
-#define KEY_WHEELDOWN KEY_F(21)
-#define KEY_RECLICK KEY_F(22)
+#define KEY_WHEELUP KEY_F(30)
+#define KEY_WHEELDOWN KEY_F(31)
+#define KEY_RECLICK KEY_F(32)
#define KEY_ALT(x) (KEY_F(64 - 26) + ((x) - 'A'))
extern const char* CRT_degreeSign;
diff --git a/CategoriesPanel.c b/CategoriesPanel.c
index 21010b3..30867ee 100644
--- a/CategoriesPanel.c
+++ b/CategoriesPanel.c
@@ -1,7 +1,7 @@
/*
htop - CategoriesPanel.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/CategoriesPanel.h b/CategoriesPanel.h
index 451a483..825cd06 100644
--- a/CategoriesPanel.h
+++ b/CategoriesPanel.h
@@ -3,7 +3,7 @@
/*
htop - CategoriesPanel.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ChangeLog b/ChangeLog
index b5725ec..6f0a7da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+What's new in version 3.1.1
+
+* Update license headers to explicitly say GPLv2+
+* Document minimum version for libcap (thanks to James Brown)
+* Fix mouse wheel collision with autogroups nice adjustment
+* Adjust Makefile.am macro definitions for older automake versions
+* Ensure consistent reporting of MemoryMeter 'used' memory
+* Report hugepage memory as real and used memory (as before)
+* Handle procExeDeleted, usesDeletedLib without mergedCommandline mode
+* Validate meter configuration before proceeding beyond htoprc parsing
+* Properly release memory on partially read configuration
+* Handle interrupted sampling from within libpcp PDU transfers
+* On Linux, provide O_PATH value if not defined
+* On Linux, always compute procExeDeleted if already set
+* Workaround for Rosetta 2 on Darwin (thanks to Alexander Momchilov)
+* Fix FreeBSD cmdline memory leak in Process_updateCmdline, and
+* Plug a Disk I/O meter memory leak on FreeBSD (thanks to Ximalas)
+
What's new in version 3.1.0
* Updated COPYING file to remove the PLPA exemption (appendix 2)
diff --git a/ClockMeter.c b/ClockMeter.c
index 79bdecd..8e3b66e 100644
--- a/ClockMeter.c
+++ b/ClockMeter.c
@@ -1,7 +1,7 @@
/*
htop - ClockMeter.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ClockMeter.h b/ClockMeter.h
index 675df3d..def0460 100644
--- a/ClockMeter.h
+++ b/ClockMeter.h
@@ -3,7 +3,7 @@
/*
htop - ClockMeter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ColorsPanel.c b/ColorsPanel.c
index 79f001c..0ea2158 100644
--- a/ColorsPanel.c
+++ b/ColorsPanel.c
@@ -1,7 +1,7 @@
/*
htop - ColorsPanel.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ColorsPanel.h b/ColorsPanel.h
index 047f7af..373ec65 100644
--- a/ColorsPanel.h
+++ b/ColorsPanel.h
@@ -3,7 +3,7 @@
/*
htop - ColorsPanel.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ColumnsPanel.c b/ColumnsPanel.c
index d0c2b88..a1450bb 100644
--- a/ColumnsPanel.c
+++ b/ColumnsPanel.c
@@ -1,7 +1,7 @@
/*
htop - ColumnsPanel.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ColumnsPanel.h b/ColumnsPanel.h
index 8bc806e..d9360f4 100644
--- a/ColumnsPanel.h
+++ b/ColumnsPanel.h
@@ -3,7 +3,7 @@
/*
htop - ColumnsPanel.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/CommandLine.c b/CommandLine.c
index f0d2255..a352e4e 100644
--- a/CommandLine.c
+++ b/CommandLine.c
@@ -2,7 +2,7 @@
htop - CommandLine.c
(C) 2004-2011 Hisham H. Muhammad
(C) 2020-2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -47,7 +47,7 @@ static void printVersionFlag(const char* name) {
static void printHelpFlag(const char* name) {
printf("%s " VERSION "\n"
COPYRIGHT "\n"
- "Released under the GNU GPLv2.\n\n"
+ "Released under the GNU GPLv2+.\n\n"
"-C --no-color Use a monochrome color scheme\n"
"-d --delay=DELAY Set the delay between updates, in tenths of seconds\n"
"-F --filter=FILTER Show only the commands matching the given filter\n"
diff --git a/CommandLine.h b/CommandLine.h
index b1f157e..99579f5 100644
--- a/CommandLine.h
+++ b/CommandLine.h
@@ -4,7 +4,7 @@
htop - CommandLine.h
(C) 2004-2011 Hisham H. Muhammad
(C) 2020-2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Compat.c b/Compat.c
index 1077c08..2d06c48 100644
--- a/Compat.c
+++ b/Compat.c
@@ -1,7 +1,7 @@
/*
htop - Compat.c
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Compat.h b/Compat.h
index 94c2ee2..2b5e205 100644
--- a/Compat.h
+++ b/Compat.h
@@ -3,7 +3,7 @@
/*
htop - Compat.h
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/DateMeter.c b/DateMeter.c
index d01f464..9628596 100644
--- a/DateMeter.c
+++ b/DateMeter.c
@@ -1,7 +1,7 @@
/*
htop - DateMeter.c
(C) 2004-2020 Hisham H. Muhammad, Michael Schönitzer
-Released under the GNU GPL, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/DateMeter.h b/DateMeter.h
index a6ce47a..ecbfa99 100644
--- a/DateMeter.h
+++ b/DateMeter.h
@@ -3,7 +3,7 @@
/*
htop - DateMeter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPL, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/DateTimeMeter.c b/DateTimeMeter.c
index a042a61..1044ff3 100644
--- a/DateTimeMeter.c
+++ b/DateTimeMeter.c
@@ -1,7 +1,7 @@
/*
htop - DateTimeMeter.c
(C) 2004-2020 Hisham H. Muhammad, Michael Schönitzer
-Released under the GNU GPL, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/DateTimeMeter.h b/DateTimeMeter.h
index 04cc327..5196dd3 100644
--- a/DateTimeMeter.h
+++ b/DateTimeMeter.h
@@ -3,7 +3,7 @@
/*
htop - DateTimeMeter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPL, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/DiskIOMeter.c b/DiskIOMeter.c
index 67122a1..c5f1476 100644
--- a/DiskIOMeter.c
+++ b/DiskIOMeter.c
@@ -1,7 +1,7 @@
/*
htop - DiskIOMeter.c
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/DiskIOMeter.h b/DiskIOMeter.h
index 68ea638..3b03e32 100644
--- a/DiskIOMeter.h
+++ b/DiskIOMeter.h
@@ -3,7 +3,7 @@
/*
htop - DiskIOMeter.h
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/DisplayOptionsPanel.c b/DisplayOptionsPanel.c
index 7e05ae0..516fb50 100644
--- a/DisplayOptionsPanel.c
+++ b/DisplayOptionsPanel.c
@@ -1,7 +1,7 @@
/*
htop - DisplayOptionsPanel.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/DisplayOptionsPanel.h b/DisplayOptionsPanel.h
index 745f125..5e87a63 100644
--- a/DisplayOptionsPanel.h
+++ b/DisplayOptionsPanel.h
@@ -3,7 +3,7 @@
/*
htop - DisplayOptionsPanel.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/DynamicColumn.c b/DynamicColumn.c
index c6a0cc0..bd038df 100644
--- a/DynamicColumn.c
+++ b/DynamicColumn.c
@@ -3,7 +3,7 @@ htop - DynamicColumn.c
(C) 2021 Sohaib Mohammed
(C) 2021 htop dev team
(C) 2021 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/DynamicMeter.c b/DynamicMeter.c
index 16c27f8..a8cd76c 100644
--- a/DynamicMeter.c
+++ b/DynamicMeter.c
@@ -2,7 +2,7 @@
htop - DynamicMeter.c
(C) 2021 htop dev team
(C) 2021 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/FunctionBar.c b/FunctionBar.c
index 1c260ab..fc3304a 100644
--- a/FunctionBar.c
+++ b/FunctionBar.c
@@ -1,7 +1,7 @@
/*
htop - FunctionBar.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/FunctionBar.h b/FunctionBar.h
index 1f52658..ebe405f 100644
--- a/FunctionBar.h
+++ b/FunctionBar.h
@@ -3,7 +3,7 @@
/*
htop - FunctionBar.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Hashtable.c b/Hashtable.c
index d040afa..c880cf7 100644
--- a/Hashtable.c
+++ b/Hashtable.c
@@ -1,7 +1,7 @@
/*
htop - Hashtable.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Hashtable.h b/Hashtable.h
index d6b7be2..f51a294 100644
--- a/Hashtable.h
+++ b/Hashtable.h
@@ -3,7 +3,7 @@
/*
htop - Hashtable.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Header.c b/Header.c
index 26cd923..1652520 100644
--- a/Header.c
+++ b/Header.c
@@ -1,7 +1,7 @@
/*
htop - Header.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Header.h b/Header.h
index 060ad02..954d434 100644
--- a/Header.h
+++ b/Header.h
@@ -3,7 +3,7 @@
/*
htop - Header.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/HeaderLayout.h b/HeaderLayout.h
index 7be236e..46cca14 100644
--- a/HeaderLayout.h
+++ b/HeaderLayout.h
@@ -3,7 +3,7 @@
/*
htop - HeaderLayout.h
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/HeaderOptionsPanel.c b/HeaderOptionsPanel.c
index 701f6d6..d8148df 100644
--- a/HeaderOptionsPanel.c
+++ b/HeaderOptionsPanel.c
@@ -1,7 +1,7 @@
/*
htop - HeaderOptionsPanel.c
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/HeaderOptionsPanel.h b/HeaderOptionsPanel.h
index 0d15ace..aee9328 100644
--- a/HeaderOptionsPanel.h
+++ b/HeaderOptionsPanel.h
@@ -3,7 +3,7 @@
/*
htop - ColorsPanel.h
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/HostnameMeter.c b/HostnameMeter.c
index b1570c8..78444ea 100644
--- a/HostnameMeter.c
+++ b/HostnameMeter.c
@@ -1,7 +1,7 @@
/*
htop - HostnameMeter.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/HostnameMeter.h b/HostnameMeter.h
index 85d94d8..ec1b63a 100644
--- a/HostnameMeter.h
+++ b/HostnameMeter.h
@@ -3,7 +3,7 @@
/*
htop - HostnameMeter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/IncSet.c b/IncSet.c
index 9097413..56f9c32 100644
--- a/IncSet.c
+++ b/IncSet.c
@@ -1,7 +1,7 @@
/*
htop - IncSet.c
(C) 2005-2012 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -156,7 +156,7 @@ bool IncSet_handleKey(IncSet* this, int ch, Panel* panel, IncMode_GetPanelValue
doSearch = false;
} else if (0 < ch && ch < 255 && isprint((unsigned char)ch)) {
if (mode->index < INCMODE_MAX) {
- mode->buffer[mode->index] = ch;
+ mode->buffer[mode->index] = (char) ch;
mode->index++;
mode->buffer[mode->index] = 0;
if (mode->isFilter) {
diff --git a/IncSet.h b/IncSet.h
index e2062c6..a98e7f8 100644
--- a/IncSet.h
+++ b/IncSet.h
@@ -3,7 +3,7 @@
/*
htop - IncSet.h
(C) 2005-2012 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ListItem.c b/ListItem.c
index e5464d2..9161a1c 100644
--- a/ListItem.c
+++ b/ListItem.c
@@ -1,7 +1,7 @@
/*
htop - ListItem.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ListItem.h b/ListItem.h
index 0bbca2f..2c7ae4e 100644
--- a/ListItem.h
+++ b/ListItem.h
@@ -3,7 +3,7 @@
/*
htop - ListItem.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/LoadAverageMeter.c b/LoadAverageMeter.c
index bb3b05e..3fe3d90 100644
--- a/LoadAverageMeter.c
+++ b/LoadAverageMeter.c
@@ -1,7 +1,7 @@
/*
htop - LoadAverageMeter.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/LoadAverageMeter.h b/LoadAverageMeter.h
index d575ad5..a34a4a3 100644
--- a/LoadAverageMeter.h
+++ b/LoadAverageMeter.h
@@ -3,7 +3,7 @@
/*
htop - LoadAverageMeter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/MainPanel.c b/MainPanel.c
index e7033bf..07dc631 100644
--- a/MainPanel.c
+++ b/MainPanel.c
@@ -2,7 +2,7 @@
htop - ColumnsPanel.c
(C) 2004-2015 Hisham H. Muhammad
(C) 2020 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -61,8 +61,14 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
if (ch == KEY_RESIZE)
return IGNORED;
- /* reset on every normal key, except mouse events while mouse support is disabled */
- if (ch != ERR && (ch != KEY_MOUSE || this->state->settings->enableMouse))
+ /* reset on every normal key */
+ bool needReset = ch != ERR;
+ #ifdef HAVE_GETMOUSE
+ /* except mouse events while mouse support is disabled */
+ if (!(ch != KEY_MOUSE || this->state->settings->enableMouse))
+ needReset = false;
+ #endif
+ if (needReset)
this->state->hideProcessSelection = false;
if (EVENT_IS_HEADER_CLICK(ch)) {
diff --git a/MainPanel.h b/MainPanel.h
index 04f347d..04f4c0a 100644
--- a/MainPanel.h
+++ b/MainPanel.h
@@ -4,7 +4,7 @@
htop - ColumnsPanel.h
(C) 2004-2015 Hisham H. Muhammad
(C) 2020 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Makefile.am b/Makefile.am
index 81b9c93..7ed500c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,11 @@
+if !HTOP_PCP
+bin_PROGRAMS = htop
+myhtopplatprogram = htop.c
+else
+bin_PROGRAMS = pcp-htop
+myhtopplatprogram = pcp-htop.c
+endif
+
dist_man_MANS = htop.1
EXTRA_DIST = \
$(dist_man_MANS) \
@@ -181,7 +189,6 @@ linux_platform_sources = \
if HTOP_LINUX
AM_LDFLAGS += -rdynamic
-myhtopplatprogram = htop
myhtopplatheaders = $(linux_platform_headers)
myhtopplatsources = $(linux_platform_sources)
endif
@@ -214,7 +221,6 @@ freebsd_platform_sources = \
zfs/ZfsCompressedArcMeter.c
if HTOP_FREEBSD
-myhtopplatprogram = htop
myhtopplatheaders = $(freebsd_platform_headers)
myhtopplatsources = $(freebsd_platform_sources)
endif
@@ -240,7 +246,6 @@ dragonflybsd_platform_sources = \
generic/uname.c
if HTOP_DRAGONFLYBSD
-myhtopplatprogram = htop
myhtopplatheaders = $(dragonflybsd_platform_headers)
myhtopplatsources = $(dragonflybsd_platform_sources)
endif
@@ -266,7 +271,6 @@ netbsd_platform_sources = \
netbsd/NetBSDProcessList.c
if HTOP_NETBSD
-myhtopplatprogram = htop
myhtopplatheaders = $(netbsd_platform_headers)
myhtopplatsources = $(netbsd_platform_sources)
endif
@@ -292,7 +296,6 @@ openbsd_platform_sources = \
openbsd/Platform.c
if HTOP_OPENBSD
-myhtopplatprogram = htop
myhtopplatheaders = $(openbsd_platform_headers)
myhtopplatsources = $(openbsd_platform_sources)
endif
@@ -304,6 +307,7 @@ darwin_platform_headers = \
darwin/DarwinProcess.h \
darwin/DarwinProcessList.h \
darwin/Platform.h \
+ darwin/PlatformHelpers.h \
darwin/ProcessField.h \
generic/gettime.h \
generic/hostname.h \
@@ -315,6 +319,7 @@ darwin_platform_headers = \
darwin_platform_sources = \
darwin/Platform.c \
+ darwin/PlatformHelpers.c \
darwin/DarwinProcess.c \
darwin/DarwinProcessList.c \
generic/gettime.c \
@@ -326,7 +331,6 @@ darwin_platform_sources = \
if HTOP_DARWIN
AM_LDFLAGS += -framework IOKit -framework CoreFoundation
-myhtopplatprogram = htop
myhtopplatheaders = $(darwin_platform_headers)
myhtopplatsources = $(darwin_platform_sources)
endif
@@ -357,7 +361,6 @@ solaris_platform_sources = \
zfs/ZfsCompressedArcMeter.c
if HTOP_SOLARIS
-myhtopplatprogram = htop
myhtopplatheaders = $(solaris_platform_headers)
myhtopplatsources = $(solaris_platform_sources)
endif
@@ -393,10 +396,9 @@ pcp_platform_sources = \
zfs/ZfsCompressedArcMeter.c
if HTOP_PCP
-myhtopplatprogram = pcp-htop
myhtopplatheaders = $(pcp_platform_headers)
myhtopplatsources = $(pcp_platform_sources)
-pcp_htop_SOURCES = $(myhtopplatprogram).c $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources)
+pcp_htop_SOURCES = $(myhtopplatprogram) $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources)
endif
# Unsupported
@@ -416,15 +418,13 @@ unsupported_platform_sources = \
unsupported/UnsupportedProcessList.c
if HTOP_UNSUPPORTED
-myhtopplatprogram = htop
myhtopplatsources = $(unsupported_platform_sources)
myhtopplatheaders = $(unsupported_platform_headers)
endif
# ----
-bin_PROGRAMS = $(myhtopplatprogram)
-htop_SOURCES = $(myhtopplatprogram).c $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources)
+htop_SOURCES = $(myhtopplatprogram) $(myhtopheaders) $(myhtopplatheaders) $(myhtopsources) $(myhtopplatsources)
nodist_htop_SOURCES = config.h
target:
diff --git a/MemoryMeter.c b/MemoryMeter.c
index 75ad7e8..89e242c 100644
--- a/MemoryMeter.c
+++ b/MemoryMeter.c
@@ -1,7 +1,7 @@
/*
htop - MemoryMeter.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -36,7 +36,7 @@ static void MemoryMeter_updateValues(Meter* this) {
/* Do not print available memory in bar mode */
this->curItems = 4;
- written = Meter_humanUnit(buffer, isnan(this->values[4]) ? this->values[0] : this->total - this->values[4], size);
+ written = Meter_humanUnit(buffer, this->values[0], size);
METER_BUFFER_CHECK(buffer, size, written);
METER_BUFFER_APPEND_CHR(buffer, size, '/');
diff --git a/MemoryMeter.h b/MemoryMeter.h
index 6d7dd82..d23021e 100644
--- a/MemoryMeter.h
+++ b/MemoryMeter.h
@@ -3,7 +3,7 @@
/*
htop - MemoryMeter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/MemorySwapMeter.c b/MemorySwapMeter.c
index 612549d..46b2a6b 100644
--- a/MemorySwapMeter.c
+++ b/MemorySwapMeter.c
@@ -1,7 +1,7 @@
/*
htop - MemorySwapMeter.c
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/MemorySwapMeter.h b/MemorySwapMeter.h
index b4180a1..a98d5e6 100644
--- a/MemorySwapMeter.h
+++ b/MemorySwapMeter.h
@@ -3,7 +3,7 @@
/*
htop - MemorySwapMeter.h
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Meter.c b/Meter.c
index 73e99ce..8df8517 100644
--- a/Meter.c
+++ b/Meter.c
@@ -1,7 +1,7 @@
/*
htop - Meter.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Meter.h b/Meter.h
index 0e6b3f9..be8207c 100644
--- a/Meter.h
+++ b/Meter.h
@@ -3,7 +3,7 @@
/*
htop - Meter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/MetersPanel.c b/MetersPanel.c
index 13c102d..1bdefdb 100644
--- a/MetersPanel.c
+++ b/MetersPanel.c
@@ -1,7 +1,7 @@
/*
htop - MetersPanel.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/MetersPanel.h b/MetersPanel.h
index cf4de60..679c12d 100644
--- a/MetersPanel.h
+++ b/MetersPanel.h
@@ -3,7 +3,7 @@
/*
htop - MetersPanel.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Object.c b/Object.c
index f361394..f009148 100644
--- a/Object.c
+++ b/Object.c
@@ -2,7 +2,7 @@
htop - Object.c
(C) 2004-2012 Hisham H. Muhammad
(C) 2020 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Object.h b/Object.h
index e18fb97..d5b3bb3 100644
--- a/Object.h
+++ b/Object.h
@@ -4,7 +4,7 @@
htop - Object.h
(C) 2004-2012 Hisham H. Muhammad
(C) 2020 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/OpenFilesScreen.c b/OpenFilesScreen.c
index 75eb2d3..e0bede0 100644
--- a/OpenFilesScreen.c
+++ b/OpenFilesScreen.c
@@ -1,7 +1,7 @@
/*
htop - OpenFilesScreen.c
(C) 2005-2006 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/OpenFilesScreen.h b/OpenFilesScreen.h
index f3c129c..43f95ea 100644
--- a/OpenFilesScreen.h
+++ b/OpenFilesScreen.h
@@ -3,7 +3,7 @@
/*
htop - OpenFilesScreen.h
(C) 2005-2006 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/OptionItem.c b/OptionItem.c
index 437f7ea..7ab6900 100644
--- a/OptionItem.c
+++ b/OptionItem.c
@@ -1,7 +1,7 @@
/*
htop - OptionItem.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/OptionItem.h b/OptionItem.h
index 8dd802d..35c8506 100644
--- a/OptionItem.h
+++ b/OptionItem.h
@@ -3,7 +3,7 @@
/*
htop - OptionItem.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Panel.c b/Panel.c
index dea6401..a5773d5 100644
--- a/Panel.c
+++ b/Panel.c
@@ -1,7 +1,7 @@
/*
htop - Panel.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -453,7 +453,7 @@ HandlerResult Panel_selectByTyping(Panel* this, int ch) {
}
if (len < 99) {
- buffer[len] = ch;
+ buffer[len] = (char) ch;
buffer[len + 1] = '\0';
}
@@ -470,7 +470,7 @@ HandlerResult Panel_selectByTyping(Panel* this, int ch) {
// if current word did not match,
// retry considering the character the start of a new word.
- buffer[0] = ch;
+ buffer[0] = (char) ch;
buffer[1] = '\0';
}
diff --git a/Panel.h b/Panel.h
index 41dba21..9bb4c77 100644
--- a/Panel.h
+++ b/Panel.h
@@ -3,7 +3,7 @@
/*
htop - Panel.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -67,7 +67,7 @@ struct Panel_ {
int selectedLen;
void* eventHandlerState;
int scrollV;
- short scrollH;
+ int scrollH;
bool needsRedraw;
bool wasFocus;
FunctionBar* currentBar;
diff --git a/Process.c b/Process.c
index 556acf4..f0fc67f 100644
--- a/Process.c
+++ b/Process.c
@@ -2,7 +2,7 @@
htop - Process.c
(C) 2004-2015 Hisham H. Muhammad
(C) 2020 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -511,6 +511,12 @@ void Process_makeCommandStr(Process* this) {
if (cmdlineBasenameEnd > cmdlineBasenameStart)
WRITE_HIGHLIGHT(showProgramPath ? cmdlineBasenameStart : 0, cmdlineBasenameEnd - cmdlineBasenameStart, baseAttr, CMDLINE_HIGHLIGHT_FLAG_BASENAME);
+
+ if (this->procExeDeleted)
+ WRITE_HIGHLIGHT(showProgramPath ? cmdlineBasenameStart : 0, cmdlineBasenameEnd - cmdlineBasenameStart, delExeAttr, CMDLINE_HIGHLIGHT_FLAG_DELETED);
+ else if (this->usesDeletedLib)
+ WRITE_HIGHLIGHT(showProgramPath ? cmdlineBasenameStart : 0, cmdlineBasenameEnd - cmdlineBasenameStart, delLibAttr, CMDLINE_HIGHLIGHT_FLAG_DELETED);
+
(void)stpcpyWithNewlineConversion(str, cmdline + (showProgramPath ? 0 : cmdlineBasenameStart));
return;
diff --git a/Process.h b/Process.h
index 1ba36de..4080d98 100644
--- a/Process.h
+++ b/Process.h
@@ -4,7 +4,7 @@
htop - Process.h
(C) 2004-2015 Hisham H. Muhammad
(C) 2020 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ProcessList.c b/ProcessList.c
index daf871a..1ce6b76 100644
--- a/ProcessList.c
+++ b/ProcessList.c
@@ -1,7 +1,7 @@
/*
htop - ProcessList.c
(C) 2004,2005 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ProcessList.h b/ProcessList.h
index 7cd2fab..a12ffa1 100644
--- a/ProcessList.h
+++ b/ProcessList.h
@@ -3,7 +3,7 @@
/*
htop - ProcessList.h
(C) 2004,2005 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ProcessLocksScreen.c b/ProcessLocksScreen.c
index 5759615..b842d2b 100644
--- a/ProcessLocksScreen.c
+++ b/ProcessLocksScreen.c
@@ -1,7 +1,7 @@
/*
htop - ProcessLocksScreen.c
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ProcessLocksScreen.h b/ProcessLocksScreen.h
index c848228..cf34de4 100644
--- a/ProcessLocksScreen.h
+++ b/ProcessLocksScreen.h
@@ -3,7 +3,7 @@
/*
htop - ProcessLocksScreen.h
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ProvideCurses.h b/ProvideCurses.h
index 4eb08a2..06602ff 100644
--- a/ProvideCurses.h
+++ b/ProvideCurses.h
@@ -3,7 +3,7 @@
/*
htop - RichString.h
(C) 2004,2011 Hisham H. Muhammad
-Released under the GNU GPL, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/README b/README
index c797f56..e4831f8 100644
--- a/README
+++ b/README
@@ -6,7 +6,7 @@
[![IRC #htop](https://img.shields.io/badge/IRC-htop-blue.svg)](https://web.libera.chat/#htop)
[![GitHub Release](https://img.shields.io/github/release/htop-dev/htop.svg)](https://github.com/htop-dev/htop/releases/latest)
[![Packaging status](https://repology.org/badge/tiny-repos/htop.svg)](https://repology.org/project/htop/versions)
-[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](COPYING?raw=true)
+[![License: GPL v2+](https://img.shields.io/badge/License-GPL%20v2+-blue.svg)](COPYING?raw=true)
![Screenshot of htop](docs/images/screenshot.png?raw=true)
@@ -47,7 +47,7 @@ List of build-time dependencies:
List of additional build-time dependencies (based on feature flags):
* `sensors`
* `hwloc`
-* `libcap`
+* `libcap` (v2.21 or later)
* `libnl-3`
Install these and other required packages for C development from your package manager.
@@ -174,4 +174,4 @@ In 2020 a [team](https://github.com/orgs/htop-dev/people) took over the developm
## License
-GNU General Public License, version 2 (GPL-2.0)
+GNU General Public License, version 2 (GPL-2.0) or, at your option, any later version.
diff --git a/RichString.c b/RichString.c
index 558c743..3dac083 100644
--- a/RichString.c
+++ b/RichString.c
@@ -1,7 +1,7 @@
/*
htop - RichString.c
(C) 2004,2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/RichString.h b/RichString.h
index 5c456d2..cbcbe48 100644
--- a/RichString.h
+++ b/RichString.h
@@ -3,7 +3,7 @@
/*
htop - RichString.h
(C) 2004,2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ScreenManager.c b/ScreenManager.c
index 914c510..54dec64 100644
--- a/ScreenManager.c
+++ b/ScreenManager.c
@@ -1,7 +1,7 @@
/*
htop - ScreenManager.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/ScreenManager.h b/ScreenManager.h
index bf55f17..455be70 100644
--- a/ScreenManager.h
+++ b/ScreenManager.h
@@ -3,7 +3,7 @@
/*
htop - ScreenManager.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Settings.c b/Settings.c
index 5ca998a..1f13b5a 100644
--- a/Settings.c
+++ b/Settings.c
@@ -1,7 +1,7 @@
/*
htop - Settings.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -28,11 +28,7 @@ void Settings_delete(Settings* this) {
free(this->filename);
free(this->fields);
for (unsigned int i = 0; i < HeaderLayout_getColumns(this->hLayout); i++) {
- if (this->hColumns[i].names) {
- for (uint8_t j = 0; j < this->hColumns[i].len; j++)
- free(this->hColumns[i].names[j]);
- free(this->hColumns[i].names);
- }
+ String_freeArray(this->hColumns[i].names);
free(this->hColumns[i].modes);
}
free(this->hColumns);
@@ -65,16 +61,51 @@ static void Settings_readMeterModes(Settings* this, const char* line, unsigned i
this->hColumns[column].modes = modes;
}
+static bool Settings_validateMeters(Settings* this) {
+ const size_t colCount = HeaderLayout_getColumns(this->hLayout);
+
+ for (size_t column = 0; column < colCount; column++) {
+ char** names = this->hColumns[column].names;
+ const int* modes = this->hColumns[column].modes;
+ const size_t len = this->hColumns[column].len;
+
+ if (!names || !modes || !len)
+ return false;
+
+ // Check for each mode there is an entry with a non-NULL name
+ for (size_t meterIdx = 0; meterIdx < len; meterIdx++)
+ if (!names[meterIdx])
+ return false;
+
+ if (names[len])
+ return false;
+ }
+
+ return true;
+}
+
static void Settings_defaultMeters(Settings* this, unsigned int initialCpuCount) {
int sizes[] = { 3, 3 };
+
if (initialCpuCount > 4 && initialCpuCount <= 128) {
sizes[1]++;
}
- for (int i = 0; i < 2; i++) {
+
+ // Release any previously allocated memory
+ for (size_t i = 0; i < HeaderLayout_getColumns(this->hLayout); i++) {
+ String_freeArray(this->hColumns[i].names);
+ free(this->hColumns[i].modes);
+ }
+ free(this->hColumns);
+
+ this->hLayout = HF_TWO_50_50;
+ this->hColumns = xCalloc(HeaderLayout_getColumns(this->hLayout), sizeof(MeterColumnSetting));
+ for (size_t i = 0; i < 2; i++) {
this->hColumns[i].names = xCalloc(sizes[i] + 1, sizeof(char*));
this->hColumns[i].modes = xCalloc(sizes[i], sizeof(int));
this->hColumns[i].len = sizes[i];
}
+
int r = 0;
if (initialCpuCount > 128) {
@@ -181,8 +212,9 @@ static bool Settings_read(Settings* this, const char* fileName, unsigned int ini
this->config_version = atoi(option[1]);
if (this->config_version > CONFIG_READER_MIN_VERSION) {
// the version of the config file on disk is newer than what we can read
- fprintf(stderr, "WARNING: %s specifies configuration format version v%d, but this %s binary supports up to v%d\n.", fileName, this->config_version, PACKAGE, CONFIG_READER_MIN_VERSION);
- fprintf(stderr, " The configuration version will be downgraded to v%d when %s exits.\n", CONFIG_READER_MIN_VERSION, PACKAGE);
+ fprintf(stderr, "WARNING: %s specifies configuration format\n", fileName);
+ fprintf(stderr, " version v%d, but this %s binary only supports up to version v%d.\n", this->config_version, PACKAGE, CONFIG_READER_MIN_VERSION);
+ fprintf(stderr, " The configuration file will be downgraded to v%d when %s exits.\n", CONFIG_READER_MIN_VERSION, PACKAGE);
String_freeArray(option);
fclose(fd);
return false;
@@ -304,7 +336,7 @@ static bool Settings_read(Settings* this, const char* fileName, unsigned int ini
String_freeArray(option);
}
fclose(fd);
- if (!didReadMeters) {
+ if (!didReadMeters || !Settings_validateMeters(this)) {
Settings_defaultMeters(this, initialCpuCount);
}
return didReadAny;
@@ -328,7 +360,7 @@ static void writeFields(FILE* fd, const ProcessField* fields, Hashtable* columns
static void writeMeters(const Settings* this, FILE* fd, char separator, unsigned int column) {
const char* sep = "";
- for (uint8_t i = 0; i < this->hColumns[column].len; i++) {
+ for (size_t i = 0; i < this->hColumns[column].len; i++) {
fprintf(fd, "%s%s", sep, this->hColumns[column].names[i]);
sep = " ";
}
@@ -337,7 +369,7 @@ static void writeMeters(const Settings* this, FILE* fd, char separator, unsigned
static void writeMeterModes(const Settings* this, FILE* fd, char separator, unsigned int column) {
const char* sep = "";
- for (uint8_t i = 0; i < this->hColumns[column].len; i++) {
+ for (size_t i = 0; i < this->hColumns[column].len; i++) {
fprintf(fd, "%s%d", sep, this->hColumns[column].modes[i]);
sep = " ";
}
@@ -586,7 +618,7 @@ void Settings_setHeaderLayout(Settings* this, HeaderLayout hLayout) {
} else if (newColumns < oldColumns) {
for (unsigned int i = newColumns; i < oldColumns; i++) {
if (this->hColumns[i].names) {
- for (uint8_t j = 0; j < this->hColumns[i].len; j++)
+ for (size_t j = 0; j < this->hColumns[i].len; j++)
free(this->hColumns[i].names[j]);
free(this->hColumns[i].names);
}
diff --git a/Settings.h b/Settings.h
index 20f583c..a1f7040 100644
--- a/Settings.h
+++ b/Settings.h
@@ -3,7 +3,7 @@
/*
htop - Settings.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -22,7 +22,7 @@ in the source distribution for its full text.
#define CONFIG_READER_MIN_VERSION 2
typedef struct {
- uint8_t len;
+ size_t len;
char** names;
int* modes;
} MeterColumnSetting;
diff --git a/SignalsPanel.c b/SignalsPanel.c
index 055e3e6..f1c5379 100644
--- a/SignalsPanel.c
+++ b/SignalsPanel.c
@@ -1,7 +1,7 @@
/*
htop - SignalsPanel.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/SignalsPanel.h b/SignalsPanel.h
index 0dfe24c..da9711a 100644
--- a/SignalsPanel.h
+++ b/SignalsPanel.h
@@ -3,7 +3,7 @@
/*
htop - SignalsPanel.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/SwapMeter.c b/SwapMeter.c
index 63f58c5..081967f 100644
--- a/SwapMeter.c
+++ b/SwapMeter.c
@@ -1,7 +1,7 @@
/*
htop - SwapMeter.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/SwapMeter.h b/SwapMeter.h
index 9c4e312..485485a 100644
--- a/SwapMeter.h
+++ b/SwapMeter.h
@@ -3,7 +3,7 @@
/*
htop - SwapMeter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/SysArchMeter.c b/SysArchMeter.c
index 64b96c9..1985caa 100644
--- a/SysArchMeter.c
+++ b/SysArchMeter.c
@@ -1,7 +1,7 @@
/*
htop - SysArchMeter.c
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/SysArchMeter.h b/SysArchMeter.h
index fa6adfe..50b3869 100644
--- a/SysArchMeter.h
+++ b/SysArchMeter.h
@@ -3,7 +3,7 @@
/*
htop - SysArchMeter.h
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "Meter.h"
diff --git a/TasksMeter.c b/TasksMeter.c
index 29d3dd1..64c9837 100644
--- a/TasksMeter.c
+++ b/TasksMeter.c
@@ -1,7 +1,7 @@
/*
htop - TasksMeter.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/TasksMeter.h b/TasksMeter.h
index 4ae6ce6..9f9ba63 100644
--- a/TasksMeter.h
+++ b/TasksMeter.h
@@ -3,7 +3,7 @@
/*
htop - TasksMeter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/TraceScreen.c b/TraceScreen.c
index 93981c5..c726394 100644
--- a/TraceScreen.c
+++ b/TraceScreen.c
@@ -1,7 +1,7 @@
/*
htop - TraceScreen.c
(C) 2005-2006 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/TraceScreen.h b/TraceScreen.h
index fd34cee..7b2101e 100644
--- a/TraceScreen.h
+++ b/TraceScreen.h
@@ -3,7 +3,7 @@
/*
htop - TraceScreen.h
(C) 2005-2006 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/UptimeMeter.c b/UptimeMeter.c
index 9036e53..d4b3175 100644
--- a/UptimeMeter.c
+++ b/UptimeMeter.c
@@ -1,7 +1,7 @@
/*
htop - UptimeMeter.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/UptimeMeter.h b/UptimeMeter.h
index 36a5d88..5a852ad 100644
--- a/UptimeMeter.h
+++ b/UptimeMeter.h
@@ -3,7 +3,7 @@
/*
htop - UptimeMeter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/UsersTable.c b/UsersTable.c
index fdbfd68..8c4a0ed 100644
--- a/UsersTable.c
+++ b/UsersTable.c
@@ -1,7 +1,7 @@
/*
htop - UsersTable.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/UsersTable.h b/UsersTable.h
index ef7d0bb..ecfd214 100644
--- a/UsersTable.h
+++ b/UsersTable.h
@@ -3,7 +3,7 @@
/*
htop - UsersTable.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Vector.c b/Vector.c
index 40e6203..52ed44a 100644
--- a/Vector.c
+++ b/Vector.c
@@ -1,7 +1,7 @@
/*
htop - Vector.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/Vector.h b/Vector.h
index 5347ad7..0fdb706 100644
--- a/Vector.h
+++ b/Vector.h
@@ -3,7 +3,7 @@
/*
htop - Vector.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/XUtils.c b/XUtils.c
index c589d78..b6999f9 100644
--- a/XUtils.c
+++ b/XUtils.c
@@ -1,7 +1,7 @@
/*
htop - StringUtils.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/XUtils.h b/XUtils.h
index 13f4be4..eeb214d 100644
--- a/XUtils.h
+++ b/XUtils.h
@@ -3,7 +3,7 @@
/*
htop - StringUtils.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/configure.ac b/configure.ac
index e93afbd..1b72222 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,7 +6,7 @@
# ----------------------------------------------------------------------
AC_PREREQ([2.69])
-AC_INIT([htop], [3.1.0], [htop@groups.io], [], [https://htop.dev/])
+AC_INIT([htop], [3.1.1], [htop@groups.io], [], [https://htop.dev/])
AC_CONFIG_SRCDIR([htop.c])
AC_CONFIG_AUX_DIR([build-aux])
@@ -253,6 +253,7 @@ AC_SEARCH_LIBS([clock_gettime], [rt])
AC_CHECK_FUNCS([ \
clock_gettime \
+ dladdr \
faccessat \
fstatat \
host_get_clock_service \
@@ -261,9 +262,6 @@ AC_CHECK_FUNCS([ \
readlinkat \
])
-# Add -lexecinfo if needed
-AC_SEARCH_LIBS([backtrace], [execinfo])
-
if test "$my_htop_platform" = darwin; then
AC_CHECK_FUNCS([mach_timebase_info])
fi
@@ -409,6 +407,36 @@ if test "x$enable_affinity" = xyes; then
fi
+AC_ARG_ENABLE([unwind],
+ [AS_HELP_STRING([--enable-unwind],
+ [enable unwind support for printing backtraces; requires libunwind @<:@default=check@:>@])],
+ [],
+ [enable_unwind=check])
+case "$enable_unwind" in
+ check)
+ enable_unwind=yes
+ if test "$enable_static" = yes; then
+ AC_CHECK_LIB([lzma], [lzma_index_buffer_decode])
+ fi
+ AC_CHECK_LIB([unwind], [backtrace], [], [enable_unwind=no])
+ AC_CHECK_HEADERS([libunwind.h], [], [enable_unwind=no])
+ ;;
+ no)
+ ;;
+ yes)
+ AC_CHECK_LIB([unwind], [backtrace], [], [AC_MSG_ERROR([can not find required library libunwind])])
+ AC_CHECK_HEADERS([libunwind.h], [], [AC_MSG_ERROR([can not find require header file libunwind.h])])
+ ;;
+ *)
+ AC_MSG_ERROR([bad value '$enable_unwind' for --enable-unwind])
+ ;;
+esac
+if test "x$enable_unwind" = xno; then
+ # Fall back to backtrace(3) and add -lexecinfo if needed
+ AC_SEARCH_LIBS([backtrace], [execinfo])
+fi
+
+
AC_ARG_ENABLE([hwloc],
[AS_HELP_STRING([--enable-hwloc],
[enable hwloc support for CPU affinity; disables affinity support; requires libhwloc @<:@default=no@:>@])],
@@ -426,6 +454,7 @@ case "$enable_hwloc" in
;;
esac
+
AC_ARG_WITH([os-release],
[AS_HELP_STRING([--with-os-release=FILE],
[location of an os-release file @<:@default=/etc/os-release@:>@])],
@@ -639,7 +668,9 @@ AS_VAR_IF(CACHEVAR,yes,
AS_VAR_POPDEF([CACHEVAR])dnl
])dnl AX_CHECK_COMPILE_FLAGS
-AX_CHECK_COMPILE_FLAG([-Wnull-dereference], [AM_CFLAGS="$AM_CFLAGS -Wnull-dereference"], , [-Werror])
+AX_CHECK_COMPILE_FLAG([-Wextra-semi-stmt], [AM_CFLAGS="$AM_CFLAGS -Wextra-semi-stmt"], , [-Werror=unknown-warning-option]) dnl the autoconf check itself generates -Wextra-semi-stmt
+AX_CHECK_COMPILE_FLAG([-Wimplicit-int-conversion], [AM_CFLAGS="$AM_CFLAGS -Wimplicit-int-conversion"], , [-Werror])
+AX_CHECK_COMPILE_FLAG([-Wnull-dereference], [AM_CFLAGS="$AM_CFLAGS -Wnull-dereference"], , [-Werror])
AC_ARG_ENABLE([werror],
[AS_HELP_STRING([--enable-werror],
@@ -715,6 +746,7 @@ AC_MSG_RESULT([
(Linux) capabilities: $enable_capabilities
unicode: $enable_unicode
affinity: $enable_affinity
+ unwind: $enable_unwind
hwloc: $enable_hwloc
debug: $enable_debug
static: $enable_static
diff --git a/darwin/DarwinProcess.c b/darwin/DarwinProcess.c
index 20e91f7..62b6651 100644
--- a/darwin/DarwinProcess.c
+++ b/darwin/DarwinProcess.c
@@ -1,7 +1,7 @@
/*
htop - DarwinProcess.c
(C) 2015 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -145,7 +145,7 @@ static void DarwinProcess_updateCmdLine(const struct kinfo_proc* k, Process* pro
}
/* Allocate space for the arguments. */
- procargs = (char*)xMalloc(argmax);
+ procargs = (char*)malloc(argmax);
if ( procargs == NULL ) {
goto ERROR_A;
}
diff --git a/darwin/DarwinProcess.h b/darwin/DarwinProcess.h
index 0a49eea..b4b86fd 100644
--- a/darwin/DarwinProcess.h
+++ b/darwin/DarwinProcess.h
@@ -3,7 +3,7 @@
/*
htop - DarwinProcess.h
(C) 2015 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -12,6 +12,7 @@ in the source distribution for its full text.
#include "Settings.h"
#include "darwin/DarwinProcessList.h"
+
typedef struct DarwinProcess_ {
Process super;
diff --git a/darwin/DarwinProcessList.c b/darwin/DarwinProcessList.c
index 7dd86ff..bd7821b 100644
--- a/darwin/DarwinProcessList.c
+++ b/darwin/DarwinProcessList.c
@@ -1,7 +1,7 @@
/*
htop - DarwinProcessList.c
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -22,51 +22,11 @@ in the source distribution for its full text.
#include "ProcessList.h"
#include "darwin/DarwinProcess.h"
#include "darwin/Platform.h"
+#include "darwin/PlatformHelpers.h"
#include "generic/openzfs_sysctl.h"
#include "zfs/ZfsArcStats.h"
-struct kern {
- short int version[3];
-};
-
-static void GetKernelVersion(struct kern* k) {
- static short int version_[3] = {0};
- if (!version_[0]) {
- // just in case it fails someday
- version_[0] = version_[1] = version_[2] = -1;
- char str[256] = {0};
- size_t size = sizeof(str);
- int ret = sysctlbyname("kern.osrelease", str, &size, NULL, 0);
- if (ret == 0) {
- sscanf(str, "%hd.%hd.%hd", &version_[0], &version_[1], &version_[2]);
- }
- }
- memcpy(k->version, version_, sizeof(version_));
-}
-
-/* compare the given os version with the one installed returns:
-0 if equals the installed version
-positive value if less than the installed version
-negative value if more than the installed version
-*/
-static int CompareKernelVersion(short int major, short int minor, short int component) {
- struct kern k;
- GetKernelVersion(&k);
-
- if (k.version[0] != major) {
- return k.version[0] - major;
- }
- if (k.version[1] != minor) {
- return k.version[1] - minor;
- }
- if (k.version[2] != component) {
- return k.version[2] - component;
- }
-
- return 0;
-}
-
static void ProcessList_getHostInfo(host_basic_info_data_t* p) {
mach_msg_type_number_t info_size = HOST_BASIC_INFO_COUNT;
@@ -216,7 +176,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
}
// Disabled for High Sierra due to bug in macOS High Sierra
- bool isScanThreadSupported = ! ( CompareKernelVersion(17, 0, 0) >= 0 && CompareKernelVersion(17, 5, 0) < 0);
+ bool isScanThreadSupported = !Platform_KernelVersionIsBetween((KernelVersion) {17, 0, 0}, (KernelVersion) {17, 5, 0});
if (isScanThreadSupported) {
DarwinProcess_scanThreads(proc);
diff --git a/darwin/DarwinProcessList.h b/darwin/DarwinProcessList.h
index af1140b..393e656 100644
--- a/darwin/DarwinProcessList.h
+++ b/darwin/DarwinProcessList.h
@@ -3,7 +3,7 @@
/*
htop - DarwinProcessList.h
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/darwin/Platform.c b/darwin/Platform.c
index 93262bb..3f596a3 100644
--- a/darwin/Platform.c
+++ b/darwin/Platform.c
@@ -2,7 +2,7 @@
htop - darwin/Platform.c
(C) 2014 Hisham H. Muhammad
(C) 2015 David C. Hunt
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -35,6 +35,7 @@ in the source distribution for its full text.
#include "TasksMeter.h"
#include "UptimeMeter.h"
#include "darwin/DarwinProcessList.h"
+#include "darwin/PlatformHelpers.h"
#include "zfs/ZfsArcMeter.h"
#include "zfs/ZfsCompressedArcMeter.h"
@@ -42,6 +43,7 @@ in the source distribution for its full text.
#include <mach/clock.h>
#include <mach/mach.h>
#endif
+
#ifdef HAVE_MACH_MACH_TIME_H
#include <mach/mach_time.h>
#endif
@@ -125,15 +127,7 @@ static double Platform_nanosecondsPerMachTick = 1.0;
static double Platform_nanosecondsPerSchedulerTick = -1;
void Platform_init(void) {
- // Check if we can determine the timebase used on this system.
- // If the API is unavailable assume we get our timebase in nanoseconds.
-#ifdef HAVE_MACH_TIMEBASE_INFO
- mach_timebase_info_data_t info;
- mach_timebase_info(&info);
- Platform_nanosecondsPerMachTick = (double)info.numer / (double)info.denom;
-#else
- Platform_nanosecondsPerMachTick = 1.0;
-#endif
+ Platform_nanosecondsPerMachTick = Platform_calculateNanosecondsPerMachTick();
// Determine the number of scheduler clock ticks per second
errno = 0;
diff --git a/darwin/Platform.h b/darwin/Platform.h
index e7647db..c03a9b4 100644
--- a/darwin/Platform.h
+++ b/darwin/Platform.h
@@ -4,7 +4,7 @@
htop - darwin/Platform.h
(C) 2014 Hisham H. Muhammad
(C) 2015 David C. Hunt
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/darwin/PlatformHelpers.c b/darwin/PlatformHelpers.c
new file mode 100644
index 0000000..bde9068
--- /dev/null
+++ b/darwin/PlatformHelpers.c
@@ -0,0 +1,125 @@
+/*
+htop - darwin/PlatformHelpers.c
+(C) 2018 Pierre Malhaire, 2020-2021 htop dev team, 2021 Alexander Momchilov
+Released under the GNU GPLv2+, see the COPYING file
+in the source distribution for its full text.
+*/
+
+#include "darwin/PlatformHelpers.h"
+
+#include <errno.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/sysctl.h>
+
+#include "CRT.h"
+
+#ifdef HAVE_MACH_MACH_TIME_H
+#include <mach/mach_time.h>
+#endif
+
+
+void Platform_GetKernelVersion(KernelVersion* k) {
+ static KernelVersion cachedKernelVersion;
+
+ if (!cachedKernelVersion.major) {
+ // just in case it fails someday
+ cachedKernelVersion = (KernelVersion) { -1, -1, -1 };
+ char str[256] = {0};
+ size_t size = sizeof(str);
+ int ret = sysctlbyname("kern.osrelease", str, &size, NULL, 0);
+ if (ret == 0) {
+ sscanf(str, "%hd.%hd.%hd", &cachedKernelVersion.major, &cachedKernelVersion.minor, &cachedKernelVersion.patch);
+ }
+ }
+ memcpy(k, &cachedKernelVersion, sizeof(cachedKernelVersion));
+}
+
+int Platform_CompareKernelVersion(KernelVersion v) {
+ struct KernelVersion actualVersion;
+ Platform_GetKernelVersion(&actualVersion);
+
+ if (actualVersion.major != v.major) {
+ return actualVersion.major - v.major;
+ }
+ if (actualVersion.minor != v.minor) {
+ return actualVersion.minor - v.minor;
+ }
+ if (actualVersion.patch != v.patch) {
+ return actualVersion.patch - v.patch;
+ }
+
+ return 0;
+}
+
+bool Platform_KernelVersionIsBetween(KernelVersion lowerBound, KernelVersion upperBound) {
+ return 0 <= Platform_CompareKernelVersion(lowerBound)
+ && Platform_CompareKernelVersion(upperBound) < 0;
+}
+
+void Platform_getCPUBrandString(char *cpuBrandString, size_t cpuBrandStringSize) {
+ if (sysctlbyname("machdep.cpu.brand_string", cpuBrandString, &cpuBrandStringSize, NULL, 0) == -1) {
+ fprintf(stderr,
+ "WARN: Unable to determine the CPU brand string.\n"
+ "errno: %i, %s\n", errno, strerror(errno));
+
+ String_safeStrncpy(cpuBrandString, "UNKNOWN!", cpuBrandStringSize);
+ }
+}
+
+// Adapted from https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment
+bool Platform_isRunningTranslated() {
+ int ret = 0;
+ size_t size = sizeof(ret);
+ errno = 0;
+ if (sysctlbyname("sysctl.proc_translated", &ret, &size, NULL, 0) == -1) {
+ if (errno == ENOENT) return false;
+
+ fprintf(stderr,
+ "WARN: Could not determine if this process was running in a translation environment like Rosetta 2.\n"
+ "Assuming that we're not.\n"
+ "errno: %i, %s\n", errno, strerror(errno));
+
+ return false;
+ }
+ return ret;
+}
+
+double Platform_calculateNanosecondsPerMachTick() {
+ // Check if we can determine the timebase used on this system.
+ // If the API is unavailable assume we get our timebase in nanoseconds.
+#ifndef HAVE_MACH_TIMEBASE_INFO
+ return 1.0;
+#else
+ mach_timebase_info_data_t info;
+
+ /* WORKAROUND for `mach_timebase_info` giving incorrect values on M1 under Rosetta 2.
+ * rdar://FB9546856 https://openradar.appspot.com/radar?id=5055988478509056
+ *
+ * We don't know exactly what feature/attribute of the M1 chip causes this mistake under Rosetta 2.
+ * Until we have more Apple ARM chips to compare against, the best we can do is special-case
+ * the "Apple M1" chip specifically when running under Rosetta 2.
+ */
+
+ size_t cpuBrandStringSize = 1024;
+ char cpuBrandString[cpuBrandStringSize];
+ Platform_getCPUBrandString(cpuBrandString, cpuBrandStringSize);
+
+ bool isRunningUnderRosetta2 = Platform_isRunningTranslated();
+
+ // Kernel version 20.0.0 is macOS 11.0 (Big Sur)
+ bool isBuggedVersion = Platform_KernelVersionIsBetween((KernelVersion) {20, 0, 0}, (KernelVersion) {999, 999, 999});
+
+ if (isRunningUnderRosetta2 && String_eq(cpuBrandString, "Apple M1") && isBuggedVersion) {
+ // In this case `mach_timebase_info` provides the wrong value, so we hard-code the correct factor,
+ // as determined from `mach_timebase_info` when the process running natively.
+ info = (mach_timebase_info_data_t) { .numer = 125, .denom = 3 };
+ } else {
+ // No workarounds needed, use the OS-provided value.
+ mach_timebase_info(&info);
+ }
+
+ return (double)info.numer / (double)info.denom;
+#endif
+}
diff --git a/darwin/PlatformHelpers.h b/darwin/PlatformHelpers.h
new file mode 100644
index 0000000..f1af1c0
--- /dev/null
+++ b/darwin/PlatformHelpers.h
@@ -0,0 +1,40 @@
+#ifndef HEADER_PlatformHelpers
+#define HEADER_PlatformHelpers
+/*
+htop - darwin/PlatformHelpers.h
+(C) 2018 Pierre Malhaire, 2020-2021 htop dev team, 2021 Alexander Momchilov
+Released under the GNU GPLv2, see the COPYING file
+in the source distribution for its full text.
+*/
+
+#include <stdbool.h>
+#include <sys/types.h>
+
+
+typedef struct KernelVersion {
+ short int major;
+ short int minor;
+ short int patch;
+} KernelVersion;
+
+void Platform_GetKernelVersion(KernelVersion* k);
+
+/* compare the given os version with the one installed returns:
+0 if equals the installed version
+positive value if less than the installed version
+negative value if more than the installed version
+*/
+int Platform_CompareKernelVersion(KernelVersion v);
+
+// lowerBound <= currentVersion < upperBound
+bool Platform_KernelVersionIsBetween(KernelVersion lowerBound, KernelVersion upperBound);
+
+double Platform_calculateNanosecondsPerMachTick(void);
+
+void Platform_getCPUBrandString(char *cpuBrandString, size_t cpuBrandStringSize);
+
+bool Platform_isRunningTranslated(void);
+
+double Platform_calculateNanosecondsPerMachTick(void);
+
+#endif
diff --git a/darwin/ProcessField.h b/darwin/ProcessField.h
index 25dbb45..05fbc3b 100644
--- a/darwin/ProcessField.h
+++ b/darwin/ProcessField.h
@@ -3,7 +3,7 @@
/*
htop - darwin/ProcessField.h
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/docs/styleguide.md b/docs/styleguide.md
index d8fe264..18c53af 100644
--- a/docs/styleguide.md
+++ b/docs/styleguide.md
@@ -45,8 +45,8 @@ Example:
#define HEADER_FILENAME
/*
htop - Filename.h
-(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+(C) 2021 htop dev team
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
```
@@ -54,6 +54,8 @@ in the source distribution for its full text.
Import and use of headers
-------------------------
+We use the GPLv2+ as a shorthand indication that we release `htop` under the GNU Public license version 2 but are totally fine with users opting to apply the "any later version" clause.
+
Every file should import headers for all symbols it's using.
Thus when using a symbol from a header, even if that symbol is already imported by something else you use, you should declare an import for that header.
Doing so allows for easier restructuring of the code when things need to be moved around.
@@ -194,7 +196,7 @@ They can be a great asset to structure the flow of a method.
If you want to automate formatting your code, the following command gives you a good baseline of how it should look:
```bash
-astyle -r -xb -s3 -p -xg -c -k1 -W1 \*.c \*.h
+astyle -r -xb -s3 -p -xg -c -k1 -W1 -H \*.c \*.h
```
Working with System APIs
diff --git a/dragonflybsd/DragonFlyBSDProcess.c b/dragonflybsd/DragonFlyBSDProcess.c
index 13cef0a..a091cc6 100644
--- a/dragonflybsd/DragonFlyBSDProcess.c
+++ b/dragonflybsd/DragonFlyBSDProcess.c
@@ -2,7 +2,7 @@
htop - dragonflybsd/DragonFlyBSDProcess.c
(C) 2015 Hisham H. Muhammad
(C) 2017 Diederik de Groot
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/dragonflybsd/DragonFlyBSDProcess.h b/dragonflybsd/DragonFlyBSDProcess.h
index 22cf975..e0a77ef 100644
--- a/dragonflybsd/DragonFlyBSDProcess.h
+++ b/dragonflybsd/DragonFlyBSDProcess.h
@@ -4,7 +4,7 @@
htop - dragonflybsd/DragonFlyBSDProcess.h
(C) 2015 Hisham H. Muhammad
(C) 2017 Diederik de Groot
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/dragonflybsd/DragonFlyBSDProcessList.c b/dragonflybsd/DragonFlyBSDProcessList.c
index 08e3d7b..e44c164 100644
--- a/dragonflybsd/DragonFlyBSDProcessList.c
+++ b/dragonflybsd/DragonFlyBSDProcessList.c
@@ -2,7 +2,7 @@
htop - DragonFlyBSDProcessList.c
(C) 2014 Hisham H. Muhammad
(C) 2017 Diederik de Groot
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -333,6 +333,7 @@ static void DragonFlyBSDProcessList_updateProcessName(kvm_t* kd, const struct ki
}
char* cmdline = xMalloc(len);
+
char* at = cmdline;
int end = 0;
for (int i = 0; argv[i]; i++) {
@@ -346,6 +347,8 @@ static void DragonFlyBSDProcessList_updateProcessName(kvm_t* kd, const struct ki
*at = '\0';
Process_updateCmdline(proc, cmdline, 0, end);
+
+ free(cmdline);
}
static inline void DragonFlyBSDProcessList_scanJails(DragonFlyBSDProcessList* dfpl) {
diff --git a/dragonflybsd/DragonFlyBSDProcessList.h b/dragonflybsd/DragonFlyBSDProcessList.h
index 8a5b31c..c1bf2d1 100644
--- a/dragonflybsd/DragonFlyBSDProcessList.h
+++ b/dragonflybsd/DragonFlyBSDProcessList.h
@@ -4,7 +4,7 @@
htop - DragonFlyBSDProcessList.h
(C) 2014 Hisham H. Muhammad
(C) 2017 Diederik de Groot
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/dragonflybsd/Platform.c b/dragonflybsd/Platform.c
index 62a1fb6..bb603cb 100644
--- a/dragonflybsd/Platform.c
+++ b/dragonflybsd/Platform.c
@@ -2,7 +2,7 @@
htop - dragonflybsd/Platform.c
(C) 2014 Hisham H. Muhammad
(C) 2017 Diederik de Groot
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/dragonflybsd/Platform.h b/dragonflybsd/Platform.h
index 48ed1e9..f3f2ec5 100644
--- a/dragonflybsd/Platform.h
+++ b/dragonflybsd/Platform.h
@@ -4,7 +4,7 @@
htop - dragonflybsd/Platform.h
(C) 2014 Hisham H. Muhammad
(C) 2017 Diederik de Groot
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/dragonflybsd/ProcessField.h b/dragonflybsd/ProcessField.h
index 03dfc14..02b5568 100644
--- a/dragonflybsd/ProcessField.h
+++ b/dragonflybsd/ProcessField.h
@@ -3,7 +3,7 @@
/*
htop - dragonflybsd/ProcessField.h
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/freebsd/FreeBSDProcess.c b/freebsd/FreeBSDProcess.c
index 9f0386b..3fa55ae 100644
--- a/freebsd/FreeBSDProcess.c
+++ b/freebsd/FreeBSDProcess.c
@@ -1,7 +1,7 @@
/*
htop - FreeBSDProcess.c
(C) 2015 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/freebsd/FreeBSDProcess.h b/freebsd/FreeBSDProcess.h
index 0e0bd59..2443f89 100644
--- a/freebsd/FreeBSDProcess.h
+++ b/freebsd/FreeBSDProcess.h
@@ -3,7 +3,7 @@
/*
htop - FreeBSDProcess.h
(C) 2015 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c
index 48c0648..9bbfccb 100644
--- a/freebsd/FreeBSDProcessList.c
+++ b/freebsd/FreeBSDProcessList.c
@@ -1,7 +1,7 @@
/*
htop - FreeBSDProcessList.c
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -444,6 +444,8 @@ static void FreeBSDProcessList_updateProcessName(kvm_t* kd, const struct kinfo_p
*at = '\0';
Process_updateCmdline(proc, cmdline, 0, end);
+
+ free(cmdline);
}
static char* FreeBSDProcessList_readJailName(const struct kinfo_proc* kproc) {
diff --git a/freebsd/FreeBSDProcessList.h b/freebsd/FreeBSDProcessList.h
index ae82205..adc70e4 100644
--- a/freebsd/FreeBSDProcessList.h
+++ b/freebsd/FreeBSDProcessList.h
@@ -3,7 +3,7 @@
/*
htop - FreeBSDProcessList.h
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/freebsd/Platform.c b/freebsd/Platform.c
index 527a455..9c88b40 100644
--- a/freebsd/Platform.c
+++ b/freebsd/Platform.c
@@ -1,7 +1,7 @@
/*
htop - freebsd/Platform.c
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -284,7 +284,7 @@ bool Platform_getDiskIO(DiskIOData* data) {
if (devstat_checkversion(NULL) < 0)
return false;
- struct devinfo info = { 0 };
+ static struct devinfo info = { 0 };
struct statinfo current = { .dinfo = &info };
// get number of devices
diff --git a/freebsd/Platform.h b/freebsd/Platform.h
index e7e274c..e99232e 100644
--- a/freebsd/Platform.h
+++ b/freebsd/Platform.h
@@ -3,7 +3,7 @@
/*
htop - freebsd/Platform.h
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/freebsd/ProcessField.h b/freebsd/ProcessField.h
index 6fba6bc..8ed2746 100644
--- a/freebsd/ProcessField.h
+++ b/freebsd/ProcessField.h
@@ -3,7 +3,7 @@
/*
htop - freebsd/ProcessField.h
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/generic/gettime.c b/generic/gettime.c
index af06ef3..975457f 100644
--- a/generic/gettime.c
+++ b/generic/gettime.c
@@ -1,7 +1,7 @@
/*
htop - generic/gettime.c
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
diff --git a/generic/gettime.h b/generic/gettime.h
index c124d03..91fe43d 100644
--- a/generic/gettime.h
+++ b/generic/gettime.h
@@ -3,7 +3,7 @@
/*
htop - generic/gettime.h
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/generic/hostname.c b/generic/hostname.c
index 2e3d5c3..69a4146 100644
--- a/generic/hostname.c
+++ b/generic/hostname.c
@@ -1,7 +1,7 @@
/*
htop - generic/hostname.c
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
diff --git a/generic/hostname.h b/generic/hostname.h
index 32f0c46..1e6c52d 100644
--- a/generic/hostname.h
+++ b/generic/hostname.h
@@ -3,7 +3,7 @@
/*
htop - generic/hostname.h
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/generic/openzfs_sysctl.c b/generic/openzfs_sysctl.c
index c7d79bc..d088da7 100644
--- a/generic/openzfs_sysctl.c
+++ b/generic/openzfs_sysctl.c
@@ -1,7 +1,7 @@
/*
htop - generic/openzfs_sysctl.c
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/generic/openzfs_sysctl.h b/generic/openzfs_sysctl.h
index dab1305..27fa720 100644
--- a/generic/openzfs_sysctl.h
+++ b/generic/openzfs_sysctl.h
@@ -3,7 +3,7 @@
/*
htop - generic/openzfs_sysctl.h
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/generic/uname.c b/generic/uname.c
index 9263d82..21f9a3c 100644
--- a/generic/uname.c
+++ b/generic/uname.c
@@ -1,7 +1,7 @@
/*
htop - generic/uname.c
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
diff --git a/generic/uname.h b/generic/uname.h
index 820d085..940d64c 100644
--- a/generic/uname.h
+++ b/generic/uname.h
@@ -3,7 +3,7 @@
/*
htop - generic/uname.h
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/htop.1.in b/htop.1.in
index ceec216..9c66b56 100644
--- a/htop.1.in
+++ b/htop.1.in
@@ -1,4 +1,4 @@
-.TH "HTOP" "1" "2020" "@PACKAGE_STRING@" "User Commands"
+.TH "HTOP" "1" "2021" "@PACKAGE_STRING@" "User Commands"
.SH "NAME"
htop, pcp-htop \- interactive process viewer
.SH "SYNOPSIS"
@@ -632,3 +632,12 @@ Nowadays it is maintained by the community at <htop@groups.io>.
.B pcp-htop
is maintained as a collaboration between the <htop@groups.io> and <pcp@groups.io>
communities, and forms part of the Performance Co-Pilot suite of tools.
+.SH "COPYRIGHT"
+Copyright \(co 2004-2019 Hisham Muhammad.
+.br
+Copyright \(co 2020-2021 htop dev team.
+.LP
+License GPLv2+: GNU General Public License version 2 or, at your option, any later version.
+.LP
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
diff --git a/htop.c b/htop.c
index 426b59a..6b9ea48 100644
--- a/htop.c
+++ b/htop.c
@@ -2,7 +2,7 @@
htop - htop.c
(C) 2004-2011 Hisham H. Muhammad
(C) 2020-2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/HugePageMeter.c b/linux/HugePageMeter.c
index 8c637fd..1efde2f 100644
--- a/linux/HugePageMeter.c
+++ b/linux/HugePageMeter.c
@@ -1,7 +1,7 @@
/*
htop - HugePageMeter.c
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/HugePageMeter.h b/linux/HugePageMeter.h
index e3b867d..d74a19e 100644
--- a/linux/HugePageMeter.h
+++ b/linux/HugePageMeter.h
@@ -3,7 +3,7 @@
/*
htop - HugePageMeter.h
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/IOPriority.h b/linux/IOPriority.h
index 2b37cb0..78bc470 100644
--- a/linux/IOPriority.h
+++ b/linux/IOPriority.h
@@ -3,7 +3,7 @@
/*
htop - IOPriority.h
(C) 2004-2012 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
Based on ionice,
diff --git a/linux/IOPriorityPanel.c b/linux/IOPriorityPanel.c
index 1bcbf4b..3e91bc4 100644
--- a/linux/IOPriorityPanel.c
+++ b/linux/IOPriorityPanel.c
@@ -1,7 +1,7 @@
/*
htop - IOPriorityPanel.c
(C) 2004-2012 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/IOPriorityPanel.h b/linux/IOPriorityPanel.h
index 3aa7610..cb5b338 100644
--- a/linux/IOPriorityPanel.h
+++ b/linux/IOPriorityPanel.h
@@ -3,7 +3,7 @@
/*
htop - IOPriorityPanel.h
(C) 2004-2012 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c
index 75638e4..49ae541 100644
--- a/linux/LinuxProcess.c
+++ b/linux/LinuxProcess.c
@@ -2,7 +2,7 @@
htop - LinuxProcess.c
(C) 2014 Hisham H. Muhammad
(C) 2020 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h
index 20399d9..577b903 100644
--- a/linux/LinuxProcess.h
+++ b/linux/LinuxProcess.h
@@ -4,7 +4,7 @@
htop - LinuxProcess.h
(C) 2014 Hisham H. Muhammad
(C) 2020 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index 8d82b00..dbbc57d 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -1,7 +1,7 @@
/*
htop - LinuxProcessList.c
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -58,6 +58,10 @@ in the source distribution for its full text.
#include "LibSensors.h"
#endif
+#ifndef O_PATH
+#define O_PATH 010000000 // declare for ancient glibc versions
+#endif
+
static long long btime = -1;
@@ -1236,8 +1240,8 @@ static bool LinuxProcessList_readCmdlineFile(Process* process, openat_arg_t proc
if (amtRead > 0) {
filename[amtRead] = 0;
if (!process->procExe ||
- (!process->procExeDeleted && !String_eq(filename, process->procExe)) ||
- (process->procExeDeleted && !String_startsWith(filename, process->procExe))) {
+ (!process->procExeDeleted && !String_eq(filename, process->procExe)) ||
+ process->procExeDeleted) {
const char* deletedMarker = " (deleted)";
const size_t markerLen = strlen(deletedMarker);
@@ -1605,7 +1609,7 @@ static inline void LinuxProcessList_scanMemoryInfo(ProcessList* this) {
(variable) = parsed_; \
} \
break; \
- }
+ } else (void) 0 /* Require a ";" after the macro use. */
switch (buffer[0]) {
case 'M':
@@ -1781,12 +1785,12 @@ static inline void LinuxProcessList_scanZfsArcstats(LinuxProcessList* lpl) {
if (String_startsWith(buffer, label)) { \
sscanf(buffer + strlen(label), " %*2u %32llu", variable); \
break; \
- }
+ } else (void) 0 /* Require a ";" after the macro use. */
#define tryReadFlag(label, variable, flag) \
if (String_startsWith(buffer, label)) { \
(flag) = sscanf(buffer + strlen(label), " %*2u %32llu", variable); \
break; \
- }
+ } else (void) 0 /* Require a ";" after the macro use. */
switch (buffer[0]) {
case 'c':
diff --git a/linux/LinuxProcessList.h b/linux/LinuxProcessList.h
index a5640e2..6c2f7db 100644
--- a/linux/LinuxProcessList.h
+++ b/linux/LinuxProcessList.h
@@ -3,7 +3,7 @@
/*
htop - LinuxProcessList.h
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/Platform.c b/linux/Platform.c
index 05023d5..e305e7f 100644
--- a/linux/Platform.c
+++ b/linux/Platform.c
@@ -1,7 +1,7 @@
/*
htop - linux/Platform.c
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -331,8 +331,8 @@ void Platform_setMemoryValues(Meter* this) {
const ProcessList* pl = this->pl;
const LinuxProcessList* lpl = (const LinuxProcessList*) pl;
- this->total = pl->totalMem > lpl->totalHugePageMem ? pl->totalMem - lpl->totalHugePageMem : pl->totalMem;
- this->values[0] = pl->usedMem > lpl->totalHugePageMem ? pl->usedMem - lpl->totalHugePageMem : pl->usedMem;
+ this->total = pl->totalMem;
+ this->values[0] = pl->usedMem;
this->values[1] = pl->buffersMem;
this->values[2] = pl->sharedMem;
this->values[3] = pl->cachedMem;
diff --git a/linux/Platform.h b/linux/Platform.h
index 0d6d4a9..9c4e65d 100644
--- a/linux/Platform.h
+++ b/linux/Platform.h
@@ -3,7 +3,7 @@
/*
htop - linux/Platform.h
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/PressureStallMeter.c b/linux/PressureStallMeter.c
index ff34f9b..e5089fc 100644
--- a/linux/PressureStallMeter.c
+++ b/linux/PressureStallMeter.c
@@ -2,7 +2,7 @@
htop - PressureStallMeter.c
(C) 2004-2011 Hisham H. Muhammad
(C) 2019 Ran Benita
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/PressureStallMeter.h b/linux/PressureStallMeter.h
index 7317b35..8acf46b 100644
--- a/linux/PressureStallMeter.h
+++ b/linux/PressureStallMeter.h
@@ -6,7 +6,7 @@
htop - PressureStallMeter.h
(C) 2004-2011 Hisham H. Muhammad
(C) 2019 Ran Benita
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/ProcessField.h b/linux/ProcessField.h
index 69bdff0..7047592 100644
--- a/linux/ProcessField.h
+++ b/linux/ProcessField.h
@@ -3,7 +3,7 @@
/*
htop - linux/ProcessField.h
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/SELinuxMeter.c b/linux/SELinuxMeter.c
index e3b076d..c35cb68 100644
--- a/linux/SELinuxMeter.c
+++ b/linux/SELinuxMeter.c
@@ -1,7 +1,7 @@
/*
htop - SELinuxMeter.c
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/SELinuxMeter.h b/linux/SELinuxMeter.h
index 453940c..d8a04db 100644
--- a/linux/SELinuxMeter.h
+++ b/linux/SELinuxMeter.h
@@ -3,7 +3,7 @@
/*
htop - SELinuxMeter.h
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/SystemdMeter.c b/linux/SystemdMeter.c
index 245bb7b..567cfc7 100644
--- a/linux/SystemdMeter.c
+++ b/linux/SystemdMeter.c
@@ -1,7 +1,7 @@
/*
htop - SystemdMeter.c
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/linux/SystemdMeter.h b/linux/SystemdMeter.h
index 98ce6f7..a05e087 100644
--- a/linux/SystemdMeter.h
+++ b/linux/SystemdMeter.h
@@ -4,7 +4,7 @@
/*
htop - SystemdMeter.h
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/netbsd/NetBSDProcess.c b/netbsd/NetBSDProcess.c
index 2573d06..1597ed3 100644
--- a/netbsd/NetBSDProcess.c
+++ b/netbsd/NetBSDProcess.c
@@ -4,7 +4,7 @@ htop - NetBSDProcess.c
(C) 2015 Michael McConville
(C) 2021 Santhosh Raju
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/netbsd/NetBSDProcess.h b/netbsd/NetBSDProcess.h
index a264749..b9e6b26 100644
--- a/netbsd/NetBSDProcess.h
+++ b/netbsd/NetBSDProcess.h
@@ -6,7 +6,7 @@ htop - NetBSDProcess.h
(C) 2015 Michael McConville
(C) 2021 Santhosh Raju
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/netbsd/NetBSDProcessList.c b/netbsd/NetBSDProcessList.c
index 8452050..379a491 100644
--- a/netbsd/NetBSDProcessList.c
+++ b/netbsd/NetBSDProcessList.c
@@ -4,7 +4,7 @@ htop - NetBSDProcessList.c
(C) 2015 Michael McConville
(C) 2021 Santhosh Raju
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -247,6 +247,8 @@ static void NetBSDProcessList_updateProcessName(kvm_t* kd, const struct kinfo_pr
}
Process_updateCmdline(proc, s, start, end);
+
+ free(s);
}
/*
diff --git a/netbsd/NetBSDProcessList.h b/netbsd/NetBSDProcessList.h
index 7000bd6..d228f48 100644
--- a/netbsd/NetBSDProcessList.h
+++ b/netbsd/NetBSDProcessList.h
@@ -6,7 +6,7 @@ htop - NetBSDProcessList.h
(C) 2015 Michael McConville
(C) 2021 Santhosh Raju
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/netbsd/Platform.c b/netbsd/Platform.c
index 62d90ed..ac81464 100644
--- a/netbsd/Platform.c
+++ b/netbsd/Platform.c
@@ -5,7 +5,7 @@ htop - netbsd/Platform.c
(C) 2021 Santhosh Raju
(C) 2021 Nia Alarie
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/netbsd/Platform.h b/netbsd/Platform.h
index 0420ad1..1d1115e 100644
--- a/netbsd/Platform.h
+++ b/netbsd/Platform.h
@@ -6,7 +6,7 @@ htop - netbsd/Platform.h
(C) 2015 Michael McConville
(C) 2021 Santhosh Raju
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/netbsd/ProcessField.h b/netbsd/ProcessField.h
index 61e6ca1..87d4a69 100644
--- a/netbsd/ProcessField.h
+++ b/netbsd/ProcessField.h
@@ -3,7 +3,7 @@
/*
htop - netbsd/ProcessField.h
(C) 2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/openbsd/OpenBSDProcess.c b/openbsd/OpenBSDProcess.c
index 90994a7..52dcb0e 100644
--- a/openbsd/OpenBSDProcess.c
+++ b/openbsd/OpenBSDProcess.c
@@ -2,7 +2,7 @@
htop - OpenBSDProcess.c
(C) 2015 Hisham H. Muhammad
(C) 2015 Michael McConville
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/openbsd/OpenBSDProcess.h b/openbsd/OpenBSDProcess.h
index ce078a0..898c537 100644
--- a/openbsd/OpenBSDProcess.h
+++ b/openbsd/OpenBSDProcess.h
@@ -4,7 +4,7 @@
htop - OpenBSDProcess.h
(C) 2015 Hisham H. Muhammad
(C) 2015 Michael McConville
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/openbsd/OpenBSDProcessList.c b/openbsd/OpenBSDProcessList.c
index cb47395..476af61 100644
--- a/openbsd/OpenBSDProcessList.c
+++ b/openbsd/OpenBSDProcessList.c
@@ -2,7 +2,7 @@
htop - OpenBSDProcessList.c
(C) 2014 Hisham H. Muhammad
(C) 2015 Michael McConville
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -255,6 +255,8 @@ static void OpenBSDProcessList_updateProcessName(kvm_t* kd, const struct kinfo_p
}
Process_updateCmdline(proc, s, start, end);
+
+ free(s);
}
/*
diff --git a/openbsd/OpenBSDProcessList.h b/openbsd/OpenBSDProcessList.h
index 5245705..89fdb09 100644
--- a/openbsd/OpenBSDProcessList.h
+++ b/openbsd/OpenBSDProcessList.h
@@ -4,7 +4,7 @@
htop - OpenBSDProcessList.h
(C) 2014 Hisham H. Muhammad
(C) 2015 Michael McConville
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/openbsd/Platform.c b/openbsd/Platform.c
index a62381f..b941ba7 100644
--- a/openbsd/Platform.c
+++ b/openbsd/Platform.c
@@ -2,7 +2,7 @@
htop - openbsd/Platform.c
(C) 2014 Hisham H. Muhammad
(C) 2015 Michael McConville
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/openbsd/Platform.h b/openbsd/Platform.h
index bf43ae5..b6823b5 100644
--- a/openbsd/Platform.h
+++ b/openbsd/Platform.h
@@ -4,7 +4,7 @@
htop - openbsd/Platform.h
(C) 2014 Hisham H. Muhammad
(C) 2015 Michael McConville
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/openbsd/ProcessField.h b/openbsd/ProcessField.h
index be4e51e..b8e8d6b 100644
--- a/openbsd/ProcessField.h
+++ b/openbsd/ProcessField.h
@@ -3,7 +3,7 @@
/*
htop - openbsd/ProcessField.h
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/pcp-htop.c b/pcp-htop.c
index 855bb3f..2713c89 100644
--- a/pcp-htop.c
+++ b/pcp-htop.c
@@ -2,7 +2,7 @@
htop - pcp-htop.c
(C) 2004-2011 Hisham H. Muhammad
(C) 2020-2021 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/pcp/PCPDynamicColumn.c b/pcp/PCPDynamicColumn.c
index 29dc9f9..aab2525 100644
--- a/pcp/PCPDynamicColumn.c
+++ b/pcp/PCPDynamicColumn.c
@@ -3,7 +3,7 @@ htop - PCPDynamicColumn.c
(C) 2021 Sohaib Mohammed
(C) 2021 htop dev team
(C) 2021 Red Hat, Inc.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/pcp/PCPDynamicMeter.c b/pcp/PCPDynamicMeter.c
index ccea813..7c55e4b 100644
--- a/pcp/PCPDynamicMeter.c
+++ b/pcp/PCPDynamicMeter.c
@@ -2,7 +2,7 @@
htop - PCPDynamicMeter.c
(C) 2021 htop dev team
(C) 2021 Red Hat, Inc.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h" // IWYU pragma: keep
diff --git a/pcp/PCPMetric.c b/pcp/PCPMetric.c
index c8cfe71..f6d4c97 100644
--- a/pcp/PCPMetric.c
+++ b/pcp/PCPMetric.c
@@ -2,7 +2,7 @@
htop - PCPMetric.c
(C) 2020-2021 htop dev team
(C) 2020-2021 Red Hat, Inc.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -164,7 +164,10 @@ bool PCPMetric_fetch(struct timeval* timestamp) {
pmFreeResult(pcp->result);
pcp->result = NULL;
}
- int sts = pmFetch(pcp->totalMetrics, pcp->fetch, &pcp->result);
+ int sts, count = 0;
+ do {
+ sts = pmFetch(pcp->totalMetrics, pcp->fetch, &pcp->result);
+ } while (sts == PM_ERR_IPC && ++count < 3);
if (sts < 0) {
if (pmDebugOptions.appl0)
fprintf(stderr, "Error: cannot fetch metric values: %s\n",
diff --git a/pcp/PCPMetric.h b/pcp/PCPMetric.h
index 7d62503..aa0e2a7 100644
--- a/pcp/PCPMetric.h
+++ b/pcp/PCPMetric.h
@@ -4,7 +4,7 @@
htop - PCPMetric.h
(C) 2020-2021 htop dev team
(C) 2020-2021 Red Hat, Inc.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/pcp/PCPProcess.c b/pcp/PCPProcess.c
index fa61506..a983a96 100644
--- a/pcp/PCPProcess.c
+++ b/pcp/PCPProcess.c
@@ -3,7 +3,7 @@ htop - PCPProcess.c
(C) 2014 Hisham H. Muhammad
(C) 2020-2021 htop dev team
(C) 2020-2021 Red Hat, Inc.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/pcp/PCPProcess.h b/pcp/PCPProcess.h
index e844097..46ba07f 100644
--- a/pcp/PCPProcess.h
+++ b/pcp/PCPProcess.h
@@ -5,7 +5,7 @@ htop - PCPProcess.h
(C) 2014 Hisham H. Muhammad
(C) 2020 htop dev team
(C) 2020-2021 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/pcp/PCPProcessList.c b/pcp/PCPProcessList.c
index b55b5a4..554e43d 100644
--- a/pcp/PCPProcessList.c
+++ b/pcp/PCPProcessList.c
@@ -3,7 +3,7 @@ htop - PCPProcessList.c
(C) 2014 Hisham H. Muhammad
(C) 2020-2021 htop dev team
(C) 2020-2021 Red Hat, Inc.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
@@ -680,7 +680,8 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
PCPMetric_enable(PCP_PROC_SMAPS_SWAPPSS, smaps_flag && enabled);
struct timeval timestamp;
- PCPMetric_fetch(&timestamp);
+ if (PCPMetric_fetch(&timestamp) != true)
+ return;
double sample = this->timestamp;
this->timestamp = pmtimevalToReal(&timestamp);
diff --git a/pcp/PCPProcessList.h b/pcp/PCPProcessList.h
index 07f6c39..a3a7372 100644
--- a/pcp/PCPProcessList.h
+++ b/pcp/PCPProcessList.h
@@ -3,7 +3,7 @@
/*
htop - PCPProcessList.h
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/pcp/Platform.c b/pcp/Platform.c
index 29055b9..cd7b1f4 100644
--- a/pcp/Platform.c
+++ b/pcp/Platform.c
@@ -3,7 +3,7 @@ htop - linux/Platform.c
(C) 2014 Hisham H. Muhammad
(C) 2020-2021 htop dev team
(C) 2020-2021 Red Hat, Inc.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/pcp/Platform.h b/pcp/Platform.h
index 14e5746..37a8799 100644
--- a/pcp/Platform.h
+++ b/pcp/Platform.h
@@ -5,7 +5,7 @@ htop - pcp/Platform.h
(C) 2014 Hisham H. Muhammad
(C) 2020-2021 htop dev team
(C) 2020-2021 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/pcp/ProcessField.h b/pcp/ProcessField.h
index 979addc..b3ba265 100644
--- a/pcp/ProcessField.h
+++ b/pcp/ProcessField.h
@@ -5,7 +5,7 @@ htop - pcp/ProcessField.h
(C) 2014 Hisham H. Muhammad
(C) 2021 htop dev team
(C) 2020-2021 Red Hat, Inc. All Rights Reserved.
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/scripts/htop_suppressions.valgrind b/scripts/htop_suppressions.valgrind
index 3e5c9f1..0ba4539 100644
--- a/scripts/htop_suppressions.valgrind
+++ b/scripts/htop_suppressions.valgrind
@@ -45,3 +45,13 @@
fun:CRT_setColors
fun:CRT_init
}
+
+{
+ <devstat internal memory>
+ Memcheck:Leak
+ match-leak-kinds: possible,reachable
+ ...
+ obj:*/libdevstat*
+ ...
+ fun:Platform_getDiskIO
+}
diff --git a/solaris/Platform.c b/solaris/Platform.c
index 7439195..eabbab5 100644
--- a/solaris/Platform.c
+++ b/solaris/Platform.c
@@ -3,7 +3,7 @@ htop - solaris/Platform.c
(C) 2014 Hisham H. Muhammad
(C) 2015 David C. Hunt
(C) 2017,2018 Guy M. Broome
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/solaris/Platform.h b/solaris/Platform.h
index 0a379a1..a60b978 100644
--- a/solaris/Platform.h
+++ b/solaris/Platform.h
@@ -5,7 +5,7 @@ htop - solaris/Platform.h
(C) 2014 Hisham H. Muhammad
(C) 2015 David C. Hunt
(C) 2017,2018 Guy M. Broome
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/solaris/ProcessField.h b/solaris/ProcessField.h
index 727c641..65dbcdc 100644
--- a/solaris/ProcessField.h
+++ b/solaris/ProcessField.h
@@ -3,7 +3,7 @@
/*
htop - solaris/ProcessField.h
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/solaris/SolarisProcess.c b/solaris/SolarisProcess.c
index 57071ab..c1f4958 100644
--- a/solaris/SolarisProcess.c
+++ b/solaris/SolarisProcess.c
@@ -2,7 +2,7 @@
htop - SolarisProcess.c
(C) 2015 Hisham H. Muhammad
(C) 2017,2018 Guy M. Broome
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/solaris/SolarisProcess.h b/solaris/SolarisProcess.h
index 0fd458d..13a2bc1 100644
--- a/solaris/SolarisProcess.h
+++ b/solaris/SolarisProcess.h
@@ -4,7 +4,7 @@
htop - SolarisProcess.h
(C) 2015 Hisham H. Muhammad
(C) 2017,2018 Guy M. Broome
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/solaris/SolarisProcessList.c b/solaris/SolarisProcessList.c
index 45bc5ba..33c6477 100644
--- a/solaris/SolarisProcessList.c
+++ b/solaris/SolarisProcessList.c
@@ -2,7 +2,7 @@
htop - SolarisProcessList.c
(C) 2014 Hisham H. Muhammad
(C) 2017,2018 Guy M. Broome
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/solaris/SolarisProcessList.h b/solaris/SolarisProcessList.h
index f653b7c..91fd4f4 100644
--- a/solaris/SolarisProcessList.h
+++ b/solaris/SolarisProcessList.h
@@ -4,7 +4,7 @@
htop - SolarisProcessList.h
(C) 2014 Hisham H. Muhammad
(C) 2017,2018 Guy M. Broome
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/unsupported/Platform.c b/unsupported/Platform.c
index 6fbe518..9be56ea 100644
--- a/unsupported/Platform.c
+++ b/unsupported/Platform.c
@@ -2,7 +2,7 @@
htop - unsupported/Platform.c
(C) 2014 Hisham H. Muhammad
(C) 2015 David C. Hunt
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/unsupported/Platform.h b/unsupported/Platform.h
index cdf1d0f..ace7aae 100644
--- a/unsupported/Platform.h
+++ b/unsupported/Platform.h
@@ -4,7 +4,7 @@
htop - unsupported/Platform.h
(C) 2014 Hisham H. Muhammad
(C) 2015 David C. Hunt
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/unsupported/ProcessField.h b/unsupported/ProcessField.h
index 8c07107..0c908ea 100644
--- a/unsupported/ProcessField.h
+++ b/unsupported/ProcessField.h
@@ -3,7 +3,7 @@
/*
htop - unsupported/ProcessField.h
(C) 2020 htop dev team
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/unsupported/UnsupportedProcess.c b/unsupported/UnsupportedProcess.c
index 1b9159b..af88a3e 100644
--- a/unsupported/UnsupportedProcess.c
+++ b/unsupported/UnsupportedProcess.c
@@ -1,7 +1,7 @@
/*
htop - UnsupportedProcess.c
(C) 2015 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/unsupported/UnsupportedProcess.h b/unsupported/UnsupportedProcess.h
index f39a3fb..e30169c 100644
--- a/unsupported/UnsupportedProcess.h
+++ b/unsupported/UnsupportedProcess.h
@@ -3,7 +3,7 @@
/*
htop - UnsupportedProcess.h
(C) 2015 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/unsupported/UnsupportedProcessList.c b/unsupported/UnsupportedProcessList.c
index 0486e49..470c65b 100644
--- a/unsupported/UnsupportedProcessList.c
+++ b/unsupported/UnsupportedProcessList.c
@@ -1,7 +1,7 @@
/*
htop - UnsupportedProcessList.c
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/unsupported/UnsupportedProcessList.h b/unsupported/UnsupportedProcessList.h
index 08dae0c..cbf25af 100644
--- a/unsupported/UnsupportedProcessList.h
+++ b/unsupported/UnsupportedProcessList.h
@@ -3,7 +3,7 @@
/*
htop - UnsupportedProcessList.h
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/zfs/ZfsArcMeter.c b/zfs/ZfsArcMeter.c
index 7653a35..f124272 100644
--- a/zfs/ZfsArcMeter.c
+++ b/zfs/ZfsArcMeter.c
@@ -1,7 +1,7 @@
/*
htop - ZfsArcMeter.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/zfs/ZfsArcMeter.h b/zfs/ZfsArcMeter.h
index 19a0454..3f6ea5a 100644
--- a/zfs/ZfsArcMeter.h
+++ b/zfs/ZfsArcMeter.h
@@ -3,7 +3,7 @@
/*
htop - ZfsArcMeter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/zfs/ZfsArcStats.h b/zfs/ZfsArcStats.h
index d891dc2..e2cb411 100644
--- a/zfs/ZfsArcStats.h
+++ b/zfs/ZfsArcStats.h
@@ -3,7 +3,7 @@
/*
htop - ZfsArcStats.h
(C) 2014 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/zfs/ZfsCompressedArcMeter.c b/zfs/ZfsCompressedArcMeter.c
index 29ac3c4..2e49473 100644
--- a/zfs/ZfsCompressedArcMeter.c
+++ b/zfs/ZfsCompressedArcMeter.c
@@ -1,7 +1,7 @@
/*
htop - ZfsCompressedArcMeter.c
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/
diff --git a/zfs/ZfsCompressedArcMeter.h b/zfs/ZfsCompressedArcMeter.h
index 9a53430..6e2f45f 100644
--- a/zfs/ZfsCompressedArcMeter.h
+++ b/zfs/ZfsCompressedArcMeter.h
@@ -3,7 +3,7 @@
/*
htop - ZfsCompressedArcMeter.h
(C) 2004-2011 Hisham H. Muhammad
-Released under the GNU GPLv2, see the COPYING file
+Released under the GNU GPLv2+, see the COPYING file
in the source distribution for its full text.
*/

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