From a046f759497e6c05b3b9299b9f435cf219b50097 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Thu, 21 Oct 2021 08:16:52 +0200 Subject: Fixed: Makefile now tests compiler flag compatibility --- Makefile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 3db602a..af21247 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -#* Btop++ makefile v1.2 +#* Btop++ makefile v1.4 -BANNER = \n \033[38;5;196m██████\033[38;5;240m╗ \033[38;5;196m████████\033[38;5;240m╗ \033[38;5;196m██████\033[38;5;240m╗ \033[38;5;196m██████\033[38;5;240m╗\n \033[38;5;160m██\033[38;5;239m╔══\033[38;5;160m██\033[38;5;239m╗╚══\033[38;5;160m██\033[38;5;239m╔══╝\033[38;5;160m██\033[38;5;239m╔═══\033[38;5;160m██\033[38;5;239m╗\033[38;5;160m██\033[38;5;239m╔══\033[38;5;160m██\033[38;5;239m╗ \033[38;5;160m██\033[38;5;239m╗ \033[38;5;160m██\033[38;5;239m╗\n \033[38;5;124m██████\033[38;5;238m╔╝ \033[38;5;124m██\033[38;5;238m║ \033[38;5;124m██\033[38;5;238m║ \033[38;5;124m██\033[38;5;238m║\033[38;5;124m██████\033[38;5;238m╔╝ \033[38;5;124m██████\033[38;5;238m╗\033[38;5;124m██████\033[38;5;238m╗\n \033[38;5;88m██\033[38;5;237m╔══\033[38;5;88m██\033[38;5;237m╗ \033[38;5;88m██\033[38;5;237m║ \033[38;5;88m██\033[38;5;237m║ \033[38;5;88m██\033[38;5;237m║\033[38;5;88m██\033[38;5;237m╔═══╝ ╚═\033[38;5;88m██\033[38;5;237m╔═╝╚═\033[38;5;88m██\033[38;5;237m╔═╝\n \033[38;5;52m██████\033[38;5;236m╔╝ \033[38;5;52m██\033[38;5;236m║ ╚\033[38;5;52m██████\033[38;5;236m╔╝\033[38;5;52m██\033[38;5;236m║ ╚═╝ ╚═╝\n \033[38;5;235m╚═════╝ ╚═╝ ╚═════╝ ╚═╝ \033[1;3;38;5;240mMakefile v1.3\033[0m +BANNER = \n \033[38;5;196m██████\033[38;5;240m╗ \033[38;5;196m████████\033[38;5;240m╗ \033[38;5;196m██████\033[38;5;240m╗ \033[38;5;196m██████\033[38;5;240m╗\n \033[38;5;160m██\033[38;5;239m╔══\033[38;5;160m██\033[38;5;239m╗╚══\033[38;5;160m██\033[38;5;239m╔══╝\033[38;5;160m██\033[38;5;239m╔═══\033[38;5;160m██\033[38;5;239m╗\033[38;5;160m██\033[38;5;239m╔══\033[38;5;160m██\033[38;5;239m╗ \033[38;5;160m██\033[38;5;239m╗ \033[38;5;160m██\033[38;5;239m╗\n \033[38;5;124m██████\033[38;5;238m╔╝ \033[38;5;124m██\033[38;5;238m║ \033[38;5;124m██\033[38;5;238m║ \033[38;5;124m██\033[38;5;238m║\033[38;5;124m██████\033[38;5;238m╔╝ \033[38;5;124m██████\033[38;5;238m╗\033[38;5;124m██████\033[38;5;238m╗\n \033[38;5;88m██\033[38;5;237m╔══\033[38;5;88m██\033[38;5;237m╗ \033[38;5;88m██\033[38;5;237m║ \033[38;5;88m██\033[38;5;237m║ \033[38;5;88m██\033[38;5;237m║\033[38;5;88m██\033[38;5;237m╔═══╝ ╚═\033[38;5;88m██\033[38;5;237m╔═╝╚═\033[38;5;88m██\033[38;5;237m╔═╝\n \033[38;5;52m██████\033[38;5;236m╔╝ \033[38;5;52m██\033[38;5;236m║ ╚\033[38;5;52m██████\033[38;5;236m╔╝\033[38;5;52m██\033[38;5;236m║ ╚═╝ ╚═╝\n \033[38;5;235m╚═════╝ ╚═╝ ╚═════╝ ╚═╝ \033[1;3;38;5;240mMakefile v1.4\033[0m override BTOP_VERSION := $(shell head -n100 src/btop.cpp 2>/dev/null | grep "Version =" | cut -f2 -d"\"" || echo " unknown") override TIMESTAMP := $(shell date +%s 2>/dev/null || echo "0") @@ -23,17 +23,15 @@ ARCH ?= $(shell $(CXX) -dumpmachine | cut -d "-" -f 1) override PLATFORM_LC := $(shell echo $(PLATFORM) | tr '[:upper:]' '[:lower:]') -#? Only enable fcf-protection if on x86_64 -ifneq ($(filter x86_64 i%86, $(ARCH)),) - override ADDFLAGS += -fcf-protection -endif +#? Any flags added to TESTFLAGS must not contain whitespace for the testing to work +override TESTFLAGS := -fexceptions -fcf-protection -fstack-protector -fstack-clash-protection -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS ifeq ($(STATIC),true) - override ADDFLAGS += -D STATIC_BUILD -static -static-libgcc -static-libstdc++ -Wl,--fatal-warnings + override TESTFLAGS += -DSTATIC_BUILD -static -static-libgcc -static-libstdc++ -Wl,--fatal-warnings endif ifeq ($(STRIP),true) - override ADDFLAGS += -s + override TESTFLAGS += -s endif #? Compiler and Linker @@ -66,7 +64,7 @@ $(error $(shell printf "\033[1;91mERROR: \033[97mUnsupported platform ($(PLATFOR endif #? Use all CPU cores (will only be set if using Make 4.3+) -MAKEFLAGS := --jobs=$(THREADS) +MAKEFLAGS := --jobs=$(THREADS) ifeq ($(THREADS),1) override THREADS := auto endif @@ -80,11 +78,14 @@ SRCEXT := cpp DEPEXT := d OBJEXT := o +#? Filter out unsupported compiler flags +override GOODFLAGS := $(foreach flag,$(TESTFLAGS),$(strip $(shell echo "int main() {}" | $(CXX) -o /dev/null $(flag) -x c++ - >/dev/null 2>&1 && echo $(flag) || true))) + #? Flags, Libraries and Includes override REQFLAGS := -std=c++20 WARNFLAGS := -Wall -Wextra -pedantic OPTFLAGS ?= -O2 -ftree-loop-vectorize -flto=$(THREADS) -LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector -fstack-clash-protection $(ADDFLAGS) +LDCXXFLAGS := -pthread $(GOODFLAGS) $(ADDFLAGS) override CXXFLAGS += $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS) override LDFLAGS += $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS) INC := -I$(INCDIR) -I$(SRCDIR) @@ -114,7 +115,6 @@ info: @printf "\033[1;95mLDFLAGS \033[1;92m+| \033[0;37m\$$(\033[93mLDCXXFLAGS\033[37m) \$$(\033[94mOPTFLAGS\033[37m) \$$(\033[91mWARNFLAGS\033[37m)\n" info-quiet: - @printf "\n\033[1;92mBuilding btop++ \033[91m(\033[97mv$(BTOP_VERSION)\033[91m) \033[93m$(PLATFORM) \033[96m$(ARCH)\033[0m\n" help: -- cgit v1.2.3 From a1ba01980f877c33dcb0a2f9855ac664c1b5a522 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Thu, 21 Oct 2021 16:54:18 +0200 Subject: v1.0.19 Improved build system --- CHANGELOG.md | 4 ++++ src/btop.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 197882f..6826ef8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.0.19 + +* Fixed: Makefile now tests compiler flag compatibility + ## v1.0.18 * Fixed: Makefile g++ -dumpmachine failure to get platform on some distros diff --git a/src/btop.cpp b/src/btop.cpp index cbc37b0..bfd1cb7 100644 --- a/src/btop.cpp +++ b/src/btop.cpp @@ -53,7 +53,7 @@ namespace Global { {"#801414", "██████╔╝ ██║ ╚██████╔╝██║ ╚═╝ ╚═╝"}, {"#000000", "╚═════╝ ╚═╝ ╚═════╝ ╚═╝"}, }; - const string Version = "1.0.18"; + const string Version = "1.0.19"; int coreCount; string overlay; -- cgit v1.2.3 From 496283ea1a36a81ad1d09fbc8673015e9cf2c50f Mon Sep 17 00:00:00 2001 From: aristocratos Date: Sun, 24 Oct 2021 01:16:15 +0200 Subject: Moved flags not needing to be tested --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index af21247..7fe9f4d 100644 --- a/Makefile +++ b/Makefile @@ -24,14 +24,14 @@ ARCH ?= $(shell $(CXX) -dumpmachine | cut -d "-" -f 1) override PLATFORM_LC := $(shell echo $(PLATFORM) | tr '[:upper:]' '[:lower:]') #? Any flags added to TESTFLAGS must not contain whitespace for the testing to work -override TESTFLAGS := -fexceptions -fcf-protection -fstack-protector -fstack-clash-protection -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS +override TESTFLAGS := -fexceptions -fcf-protection -fstack-protector -fstack-clash-protection ifeq ($(STATIC),true) - override TESTFLAGS += -DSTATIC_BUILD -static -static-libgcc -static-libstdc++ -Wl,--fatal-warnings + override ADDFLAGS += -DSTATIC_BUILD -static -static-libgcc -static-libstdc++ -Wl,--fatal-warnings endif ifeq ($(STRIP),true) - override TESTFLAGS += -s + override ADDFLAGS += -s endif #? Compiler and Linker @@ -84,8 +84,8 @@ override GOODFLAGS := $(foreach flag,$(TESTFLAGS),$(strip $(shell echo "int main #? Flags, Libraries and Includes override REQFLAGS := -std=c++20 WARNFLAGS := -Wall -Wextra -pedantic -OPTFLAGS ?= -O2 -ftree-loop-vectorize -flto=$(THREADS) -LDCXXFLAGS := -pthread $(GOODFLAGS) $(ADDFLAGS) +OPTFLAGS := -O2 -ftree-loop-vectorize -flto=$(THREADS) +LDCXXFLAGS := -pthread -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS $(GOODFLAGS) $(ADDFLAGS) override CXXFLAGS += $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS) override LDFLAGS += $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS) INC := -I$(INCDIR) -I$(SRCDIR) -- cgit v1.2.3 From 602cef87600437a6812b399e0a443bf68847fa95 Mon Sep 17 00:00:00 2001 From: CS Adnan Date: Mon, 25 Oct 2021 00:17:54 +0600 Subject: add support for AMD Ryzen 5000 temp sensor --- src/linux/btop_collect.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index 2a5a31d..dee61e6 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -317,6 +317,11 @@ namespace Cpu { cpu_sensor = name; break; } + if (s_contains(str_to_lower(name), "k10temp")) { + Logger::warning("Using k10temp sensors for AMD."); + cpu_sensor = name; + break; + } } if (cpu_sensor.empty()) { cpu_sensor = found_sensors.begin()->first; -- cgit v1.2.3 From 73a0ad73c0c59c8dc942b92917ae0af3f32b131e Mon Sep 17 00:00:00 2001 From: CS Adnan Date: Tue, 26 Oct 2021 11:26:52 +0600 Subject: remove log warning + extra if for k10temp --- src/linux/btop_collect.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index dee61e6..761e7e4 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -313,12 +313,7 @@ namespace Cpu { if (not got_coretemp or core_sensors.empty()) cpu_temp_only = true; if (cpu_sensor.empty() and not found_sensors.empty()) { for (const auto& [name, sensor] : found_sensors) { - if (s_contains(str_to_lower(name), "cpu")) { - cpu_sensor = name; - break; - } - if (s_contains(str_to_lower(name), "k10temp")) { - Logger::warning("Using k10temp sensors for AMD."); + if (s_contains(str_to_lower(name), "cpu") or s_contains(str_to_lower(name), "k10temp")) { cpu_sensor = name; break; } -- cgit v1.2.3 From 1e374b1edea74692f377b67a084875985e7c1575 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Tue, 26 Oct 2021 17:31:13 +0200 Subject: Removed bad code --- src/btop_tools.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/btop_tools.cpp b/src/btop_tools.cpp index 0d8705b..dec631b 100644 --- a/src/btop_tools.cpp +++ b/src/btop_tools.cpp @@ -46,7 +46,6 @@ namespace Term { atomic width = 0; atomic height = 0; string current_tty; - char* custombuf; namespace { struct termios initial_settings; @@ -122,9 +121,6 @@ namespace Term { linebuffered(false); refresh(); - //? Set 1MB buffer for cout - std::cout.rdbuf()->pubsetbuf(custombuf, 1048576); - cout << alt_screen << hide_cursor << mouse_on << flush; Global::resized = false; } -- cgit v1.2.3 From 36c74fb08a9f64500a7339fc400fdbb74d3166b7 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Tue, 26 Oct 2021 22:56:19 +0200 Subject: Changed: Regex for Fx::uncolor() changed to string search and replace --- src/btop_tools.cpp | 19 +++++++++++++++++++ src/btop_tools.hpp | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/btop_tools.cpp b/src/btop_tools.cpp index dec631b..977aa5f 100644 --- a/src/btop_tools.cpp +++ b/src/btop_tools.cpp @@ -139,6 +139,25 @@ namespace Term { //? --------------------------------------------------- FUNCTIONS ----------------------------------------------------- +namespace Fx { + string uncolor(const string& s) { + string out = s; + for (size_t offset = 0, start_pos = 0, end_pos = 0, next_pos = 0;;) { + if ((start_pos = next_pos > 0 ? next_pos : out.find('\x1b', offset)) == string::npos) + break; + offset = start_pos; + if ((end_pos = out.find('m', offset)) == string::npos) + break; + else if (next_pos = out.find('\x1b', offset + 1); end_pos - start_pos > next_pos - start_pos) + continue; + out.replace(start_pos, (end_pos - start_pos) + 1, ""); + next_pos = 0; + } + out.shrink_to_fit(); + return out; + } +} + namespace Tools { atomic active_locks (0); diff --git a/src/btop_tools.hpp b/src/btop_tools.hpp index d68d1f3..f802c77 100644 --- a/src/btop_tools.hpp +++ b/src/btop_tools.hpp @@ -64,7 +64,7 @@ namespace Fx { const regex color_regex("\033\\[\\d+;?\\d?;?\\d*;?\\d*;?\\d*(m){1}"); //* Return a string with all colors and text styling removed - inline string uncolor(const string& s) { return regex_replace(s, color_regex, ""); } + string uncolor(const string& s); } -- cgit v1.2.3 From 587005f094ba1b1b4b7da6f8289d621138f01815 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Tue, 26 Oct 2021 23:41:40 +0200 Subject: v1.0.20 Bug fixes --- CHANGELOG.md | 10 ++++++++++ src/btop.cpp | 2 +- src/btop_tools.cpp | 6 +++--- src/btop_tools.hpp | 9 +-------- src/linux/btop_collect.cpp | 6 ++---- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6826ef8..46c4310 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## v1.0.20 + +* Added: Improved cpu sensor detection for Ryzen Mobile, by @adnanpri + +* Changed: Updated makefile + +* Changed: Regex for Fx::uncolor() changed to string search and replace + +* Changed: Removed all use of regex with dedicated string functions + ## v1.0.19 * Fixed: Makefile now tests compiler flag compatibility diff --git a/src/btop.cpp b/src/btop.cpp index bfd1cb7..208da4a 100644 --- a/src/btop.cpp +++ b/src/btop.cpp @@ -53,7 +53,7 @@ namespace Global { {"#801414", "██████╔╝ ██║ ╚██████╔╝██║ ╚═╝ ╚═╝"}, {"#000000", "╚═════╝ ╚═╝ ╚═════╝ ╚═╝"}, }; - const string Version = "1.0.19"; + const string Version = "1.0.20"; int coreCount; string overlay; diff --git a/src/btop_tools.cpp b/src/btop_tools.cpp index 977aa5f..8778dbe 100644 --- a/src/btop_tools.cpp +++ b/src/btop_tools.cpp @@ -145,12 +145,12 @@ namespace Fx { for (size_t offset = 0, start_pos = 0, end_pos = 0, next_pos = 0;;) { if ((start_pos = next_pos > 0 ? next_pos : out.find('\x1b', offset)) == string::npos) break; - offset = start_pos; + offset = ++start_pos; if ((end_pos = out.find('m', offset)) == string::npos) break; - else if (next_pos = out.find('\x1b', offset + 1); end_pos - start_pos > next_pos - start_pos) + else if (next_pos = out.find('\x1b', offset); not isdigit(out[end_pos - 1]) or end_pos - start_pos > next_pos - start_pos) continue; - out.replace(start_pos, (end_pos - start_pos) + 1, ""); + out.replace(start_pos, end_pos - start_pos, ""); next_pos = 0; } out.shrink_to_fit(); diff --git a/src/btop_tools.hpp b/src/btop_tools.hpp index f802c77..c9f9b74 100644 --- a/src/btop_tools.hpp +++ b/src/btop_tools.hpp @@ -21,7 +21,6 @@ tab-size = 4 #include #include #include -#include #include #include #include @@ -30,7 +29,7 @@ tab-size = 4 #include #include -using std::string, std::vector, std::atomic, std::to_string, std::regex, std::tuple, std::array; +using std::string, std::vector, std::atomic, std::to_string, std::tuple, std::array; //? ------------------------------------------------- NAMESPACES ------------------------------------------------------ @@ -57,12 +56,6 @@ namespace Fx { //* Reset text effects and restore theme foregrund and background color extern string reset; - //* Regex for matching color, style and cursor move escape sequences - const regex escape_regex("\033\\[\\d+;?\\d?;?\\d*;?\\d*;?\\d*(m|f|s|u|C|D|A|B){1}"); - - //* Regex for matching only color and style escape sequences - const regex color_regex("\033\\[\\d+;?\\d?;?\\d*;?\\d*;?\\d*(m){1}"); - //* Return a string with all colors and text styling removed string uncolor(const string& s); diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index 761e7e4..1e5c0dc 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -21,7 +21,6 @@ tab-size = 4 #include #include #include -#include #include #include #include @@ -217,9 +216,8 @@ namespace Cpu { name += n + ' '; } name.pop_back(); - for (const auto& reg : {regex("Processor"), regex("CPU"), regex("\\(R\\)"), regex("\\(TM\\)"), regex("Intel"), - regex("AMD"), regex("Core"), regex("\\d?\\.?\\d+[mMgG][hH][zZ]")}) { - name = std::regex_replace(name, reg, ""); + for (const auto& replace : {"Processor", "CPU", "(R)", "(TM)", "Intel", "AMD", "Core"}) { + name = s_replace(name, replace, ""); } name = trim(name); } -- cgit v1.2.3 From 9ecea2c94e9d5c410aa5e571b11c203d9baf7928 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Tue, 26 Oct 2021 23:50:28 +0200 Subject: Fixed: Removed extra spaces in cpu name --- src/linux/btop_collect.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index 1e5c0dc..50a41d6 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -218,6 +218,7 @@ namespace Cpu { name.pop_back(); for (const auto& replace : {"Processor", "CPU", "(R)", "(TM)", "Intel", "AMD", "Core"}) { name = s_replace(name, replace, ""); + name = s_replace(name, " ", " "); } name = trim(name); } -- cgit v1.2.3 From a6fd835ff3d178c07deeaa6a4bfb8e8956d33ce6 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Wed, 27 Oct 2021 20:19:43 +0200 Subject: Added: / as alternative bind for filter --- src/btop_input.cpp | 2 +- src/btop_menu.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/btop_input.cpp b/src/btop_input.cpp index df9e35a..2d2a854 100644 --- a/src/btop_input.cpp +++ b/src/btop_input.cpp @@ -266,7 +266,7 @@ namespace Input { cur_i = 0; Config::set("proc_sorting", Proc::sort_vector.at(cur_i)); } - else if (key == "f") { + else if (is_in(key, "f", "/")) { Config::flip("proc_filtering"); Proc::filter = { Config::getS("proc_filter") }; old_filter = Proc::filter.text; diff --git a/src/btop_menu.cpp b/src/btop_menu.cpp index 500a86e..f4bcc11 100644 --- a/src/btop_menu.cpp +++ b/src/btop_menu.cpp @@ -126,7 +126,7 @@ namespace Menu { {"z", "Toggle totals reset for current network device"}, {"a", "Toggle auto scaling for the network graphs."}, {"y", "Toggle synced scaling mode for network graphs."}, - {"f", "To enter a process filter."}, + {"f, /", "To enter a process filter."}, {"delete", "Clear any entered filter."}, {"c", "Toggle per-core cpu usage of processes."}, {"r", "Reverse sorting order in processes box."}, -- cgit v1.2.3 From 98ae5e8f460769a12253c40566b0b609213e5093 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Sat, 30 Oct 2021 18:17:18 +0200 Subject: Updated README.md --- README.md | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 88a7efb..c6f6c68 100644 --- a/README.md +++ b/README.md @@ -38,9 +38,38 @@ ### Under development +##### 30 October 2021 + +Work on the OSX and FreeBSD branches, both initiated and mostly worked on by [@joske](https://github.com/joske), will likely be completed in the coming weeks. +The OSX branch has some memory leaks that needs to be sorted out and both have some issues with the processes cpu usage calculation and other smaller issues that needs fixing. + +If you want to help out, test for bugs/fix bugs or just try out the branches: + +**OSX** +```bash +# Install and use Homebrew or MacPorts package managers for easy dependency installation +brew install coreutils make gcc@11 +git clone https://github.com/aristocratos/btop.git +cd btop +git checkout osx +gmake +``` + +**FreeBSD** +```bash +sudo pkg install gmake gcc11 coreutils git +git clone https://github.com/aristocratos/btop.git +cd btop +git checkout freebsd +gmake +``` + +Note that GNU make (`gmake`) is recommended but not required for OSX but it is required on FreeBSD. + + ##### 6 October 2021 -OsX development have been started by @joske , big thanks :) +OsX development have been started by [@joske](https://github.com/joske), big thanks :) See branch [OSX](https://github.com/aristocratos/btop/tree/OSX) for current progress. ##### 18 September 2021 -- cgit v1.2.3 From 0f566ae688f4b58f6b0dc52a7ec80f870f00a69a Mon Sep 17 00:00:00 2001 From: aristocratos Date: Tue, 2 Nov 2021 21:10:41 +0100 Subject: Fixed: Security issue when running with SUID bit set --- src/btop.cpp | 27 +++++++++++++++++++++++++++ src/btop_config.cpp | 1 + src/btop_shared.hpp | 2 ++ src/btop_tools.cpp | 13 +++++++++++++ 4 files changed, 43 insertions(+) diff --git a/src/btop.cpp b/src/btop.cpp index 208da4a..c6a7b9c 100644 --- a/src/btop.cpp +++ b/src/btop.cpp @@ -64,6 +64,7 @@ namespace Global { string fg_green = "\x1b[1;92m"; string fg_red = "\x1b[0;91m"; + uid_t real_uid, set_uid; fs::path self_path; @@ -298,6 +299,18 @@ namespace Runner { ~thread_lock() { if (status == 0) pthread_mutex_unlock(&pt_mutex); } }; + //* Wrapper for raising priviliges when using SUID bit + class gain_priv { + int status = -1; + public: + gain_priv() { + if (Global::real_uid != Global::set_uid) this->status = seteuid(Global::set_uid); + } + ~gain_priv() { + if (status == 0) status = seteuid(Global::real_uid); + } + }; + string output; string empty_bg; bool pause_output = false; @@ -385,6 +398,9 @@ namespace Runner { //? Atomic lock used for blocking non thread-safe actions in main thread atomic_lock lck(active); + //? Set effective user if SUID bit is set + gain_priv powers{}; + auto& conf = current_conf; //! DEBUG stats @@ -616,6 +632,17 @@ int main(int argc, char **argv) { Global::start_time = time_s(); + //? Save real and effective userid's and drop priviliges until needed if running with SUID bit set + Global::real_uid = getuid(); + Global::set_uid = geteuid(); + if (Global::real_uid != Global::set_uid) { + if (seteuid(Global::real_uid) != 0) { + Global::real_uid = Global::set_uid; + Global::exit_error_msg = "Failed to change effective user ID. Unset btop SUID bit to ensure security on this system. Quitting!"; + clean_quit(1); + } + } + //? Call argument parser if launched with arguments if (argc > 1) argumentParser(argc, argv); diff --git a/src/btop_config.cpp b/src/btop_config.cpp index ca3e66a..b0edcde 100644 --- a/src/btop_config.cpp +++ b/src/btop_config.cpp @@ -589,6 +589,7 @@ namespace Config { void write() { if (conf_file.empty() or not write_new) return; Logger::debug("Writing new config file"); + if (geteuid() != Global::real_uid and seteuid(Global::real_uid) != 0) return; std::ofstream cwrite(conf_file, std::ios::trunc); if (cwrite.good()) { cwrite << "#? Config file for btop v. " << Global::Version; diff --git a/src/btop_shared.hpp b/src/btop_shared.hpp index 832208c..b5eaf6b 100644 --- a/src/btop_shared.hpp +++ b/src/btop_shared.hpp @@ -27,6 +27,7 @@ tab-size = 4 #include #include #include +#include using std::string, std::vector, std::deque, robin_hood::unordered_flat_map, std::atomic, std::array, std::tuple; @@ -43,6 +44,7 @@ namespace Global { extern atomic resized; extern string overlay; extern string clock; + extern uid_t real_uid, set_uid; } namespace Runner { diff --git a/src/btop_tools.cpp b/src/btop_tools.cpp index 8778dbe..061e43f 100644 --- a/src/btop_tools.cpp +++ b/src/btop_tools.cpp @@ -406,6 +406,18 @@ namespace Logger { size_t loglevel; fs::path logfile; + //* Wrapper for lowering priviliges if using SUID bit and currently isn't using real userid + class lose_priv { + int status = -1; + public: + lose_priv() { + if (geteuid() != Global::real_uid) this->status = seteuid(Global::real_uid); + } + ~lose_priv() { + if (status == 0) status = seteuid(Global::set_uid); + } + }; + void set(const string& level) { loglevel = v_index(log_levels, level); } @@ -413,6 +425,7 @@ namespace Logger { void log_write(const size_t level, const string& msg) { if (loglevel < level or logfile.empty()) return; atomic_lock lck(busy, true); + lose_priv neutered{}; std::error_code ec; try { if (fs::exists(logfile) and fs::file_size(logfile, ec) > 1024 << 10 and not ec) { -- cgit v1.2.3 From 6383ef8704b01e331121bda16a83472ead99ae21 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Tue, 2 Nov 2021 21:18:44 +0100 Subject: v1.0.21 Security and bug fixes --- CHANGELOG.md | 8 ++++++++ src/btop.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46c4310..56e530f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## v1.0.21 + +* Fixed: Removed extra spaces in cpu name + +* Added: / as alternative bind for filter + +* Fixed: Security issue when running with SUID bit set + ## v1.0.20 * Added: Improved cpu sensor detection for Ryzen Mobile, by @adnanpri diff --git a/src/btop.cpp b/src/btop.cpp index c6a7b9c..ee95cfb 100644 --- a/src/btop.cpp +++ b/src/btop.cpp @@ -53,7 +53,7 @@ namespace Global { {"#801414", "██████╔╝ ██║ ╚██████╔╝██║ ╚═╝ ╚═╝"}, {"#000000", "╚═════╝ ╚═╝ ╚═════╝ ╚═╝"}, }; - const string Version = "1.0.20"; + const string Version = "1.0.21"; int coreCount; string overlay; -- cgit v1.2.3 From 77244dd65f5528f5a9ade3cd7d04c0120f763c8b Mon Sep 17 00:00:00 2001 From: Denis Yaremov Date: Wed, 3 Nov 2021 14:04:31 +0200 Subject: Update to Readme.md There seems to be a problem with `osx => OSX` branch casing, the command doesn't work by just copy and pasting on osx --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c6f6c68..0ae48df 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ If you want to help out, test for bugs/fix bugs or just try out the branches: brew install coreutils make gcc@11 git clone https://github.com/aristocratos/btop.git cd btop -git checkout osx +git checkout OSX gmake ``` -- cgit v1.2.3 From 156998073a9710a288fcb6ca8fe4fee226b04bc4 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Wed, 3 Nov 2021 21:01:34 +0100 Subject: Fixed: Bad values for disks and network on 32-bit --- src/linux/btop_collect.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp index 50a41d6..7e34de7 100644 --- a/src/linux/btop_collect.cpp +++ b/src/linux/btop_collect.cpp @@ -904,8 +904,8 @@ namespace Mem { //? Get disk/partition stats for (auto& [mountpoint, disk] : disks) { if (std::error_code ec; not fs::exists(mountpoint, ec)) continue; - struct statvfs vfs; - if (statvfs(mountpoint.c_str(), &vfs) < 0) { + struct statvfs64 vfs; + if (statvfs64(mountpoint.c_str(), &vfs) < 0) { Logger::warning("Failed to get disk/partition stats with statvfs() for: " + mountpoint); continue; } @@ -1065,7 +1065,7 @@ namespace Net { auto& bandwidth = net.at(iface).bandwidth.at(dir); uint64_t val = saved_stat.last; - try { val = max((uint64_t)stoul(readfile(sys_file, "0")), val); } + try { val = max((uint64_t)stoull(readfile(sys_file, "0")), val); } catch (const std::invalid_argument&) {} catch (const std::out_of_range&) {} -- cgit v1.2.3 From 2107f70e716fd3eb9b229eb6b8c56398cd5228d6 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Wed, 3 Nov 2021 22:01:49 +0100 Subject: Updated README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 0ae48df..3286929 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,8 @@ Also needs a UTF8 locale and a font that covers: 1. **Download btop-(VERSION)-(PLATFORM)-(ARCH).tbz from [latest release](https://github.com/aristocratos/btop/releases/latest) and unpack to a new folder** + **Notice! Use x86_64 for 64-bit x86 systems, i486 and i686 are 32-bit!** + 2. **Install (from created folder)** * **Run install.sh or:** -- cgit v1.2.3 From 45169223ebb6ed792b92e8c74bdf5b281712d1e0 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Wed, 3 Nov 2021 22:11:31 +0100 Subject: v1.0.22 Fixed 32-bit --- CHANGELOG.md | 4 ++++ src/btop.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 56e530f..4d03067 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v1.0.22 + +* Fixed: Bad values for disks and network on 32-bit + ## v1.0.21 * Fixed: Removed extra spaces in cpu name diff --git a/src/btop.cpp b/src/btop.cpp index ee95cfb..5034629 100644 --- a/src/btop.cpp +++ b/src/btop.cpp @@ -53,7 +53,7 @@ namespace Global { {"#801414", "██████╔╝ ██║ ╚██████╔╝██║ ╚═╝ ╚═╝"}, {"#000000", "╚═════╝ ╚═╝ ╚═════╝ ╚═╝"}, }; - const string Version = "1.0.21"; + const string Version = "1.0.22"; int coreCount; string overlay; -- cgit v1.2.3 From 9af8e0074d8e1c81bbde6b973f5c9dddb8e577c0 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Thu, 4 Nov 2021 12:36:23 +0100 Subject: Fixed: Config parser missing first value when not including version header --- src/btop_config.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/btop_config.cpp b/src/btop_config.cpp index b0edcde..6284084 100644 --- a/src/btop_config.cpp +++ b/src/btop_config.cpp @@ -530,9 +530,8 @@ namespace Config { vector valid_names; for (auto &n : descriptions) valid_names.push_back(n[0]); - string v_string; - getline(cread, v_string, '\n'); - if (not s_contains(v_string, Global::Version)) + + if (string v_string; cread.peek() != '#' or (getline(cread, v_string, '\n') and not s_contains(v_string, Global::Version))) write_new = true; while (not cread.eof()) { cread >> std::ws; -- cgit v1.2.3 From a6dba19817f8f69ca8b07384eb4524fbde5d9725 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Thu, 4 Nov 2021 12:44:11 +0100 Subject: Fixed: Vim keys menu lists selection --- src/btop_menu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/btop_menu.cpp b/src/btop_menu.cpp index f4bcc11..fa7f6a5 100644 --- a/src/btop_menu.cpp +++ b/src/btop_menu.cpp @@ -1142,8 +1142,8 @@ namespace Menu { auto& optList = optionsList.at(option).get(); int i = v_index(optList, Config::getS(option)); - if (key == "right" and ++i >= (int)optList.size()) i = 0; - else if (key == "left" and --i < 0) i = optList.size() - 1; + if ((key == "right" or (vim_keys and key == "l")) and ++i >= (int)optList.size()) i = 0; + else if ((key == "left" or (vim_keys and key == "h")) and --i < 0) i = optList.size() - 1; Config::set(option, optList.at(i)); if (option == "color_theme") -- cgit v1.2.3 From e4ac3d9b21549c8808ea5e3ada23924b91f72447 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Mon, 8 Nov 2021 12:46:18 +0100 Subject: Fixed: Stall when clearing input queue on exit and queue is >1 --- src/btop.cpp | 2 +- src/btop_input.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/btop.cpp b/src/btop.cpp index 5034629..f49189e 100644 --- a/src/btop.cpp +++ b/src/btop.cpp @@ -208,7 +208,6 @@ void clean_quit(int sig) { } Config::write(); - Input::clear(); //? Wait for any remaining Tools::atomic_lock destructors to finish for max 1000ms for (int i = 0; Tools::active_locks > 0 and i < 100; i++) { @@ -216,6 +215,7 @@ void clean_quit(int sig) { } if (Term::initialized) { + Input::clear(); Term::restore(); } diff --git a/src/btop_input.cpp b/src/btop_input.cpp index 2d2a854..a69e4bd 100644 --- a/src/btop_input.cpp +++ b/src/btop_input.cpp @@ -95,7 +95,7 @@ namespace Input { string get() { string key; while (cin.rdbuf()->in_avail() > 0 and key.size() < 100) key += cin.get(); - if (cin.rdbuf()->in_avail() > 0) cin.ignore(cin.rdbuf()->in_avail()); + if (cin.rdbuf()->in_avail() > 0) clear(); if (not key.empty()) { //? Remove escape code prefix if present if (key.substr(0, 2) == Fx::e) { @@ -175,7 +175,12 @@ namespace Input { } void clear() { - if (cin.rdbuf()->in_avail() > 0) cin.ignore(SSmax); + auto first_num = cin.rdbuf()->in_avail(); + while (cin.rdbuf()->in_avail() == first_num) { + if (first_num-- == 0) break; + cin.ignore(1); + + } } void process(const string& key) { -- cgit v1.2.3 From c133997b210001c7ec9f556da438a71ebbd7edde Mon Sep 17 00:00:00 2001 From: aristocratos Date: Mon, 8 Nov 2021 18:48:11 +0100 Subject: Fixed: Inconsistent behaviour of "q" key in the menus --- src/btop_input.cpp | 1 - src/btop_menu.cpp | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/btop_input.cpp b/src/btop_input.cpp index a69e4bd..885121f 100644 --- a/src/btop_input.cpp +++ b/src/btop_input.cpp @@ -179,7 +179,6 @@ namespace Input { while (cin.rdbuf()->in_avail() == first_num) { if (first_num-- == 0) break; cin.ignore(1); - } } diff --git a/src/btop_menu.cpp b/src/btop_menu.cpp index fa7f6a5..891ea1f 100644 --- a/src/btop_menu.cpp +++ b/src/btop_menu.cpp @@ -892,10 +892,7 @@ namespace Menu { }; } } - else if (key == "q") { - exit(0); - } - else if (is_in(key, "escape", "m", "mouse_click")) { + else if (is_in(key, "escape", "q", "m", "mouse_click")) { return Closed; } else if (key.starts_with("button_")) { -- cgit v1.2.3 From 0201b5f859c530f8382a74e47e93c85c5ca7d4f1 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Mon, 8 Nov 2021 18:58:25 +0100 Subject: v1.0.23 Bug fixes --- CHANGELOG.md | 10 ++++++++++ src/btop.cpp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d03067..6bce917 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## v1.0.23 + +* Fixed: Config parser missing first value when not including version header + +* Fixed: Vim keys menu lists selection + +* Fixed: Stall when clearing input queue on exit and queue is >1 + +* Fixed: Inconsistent behaviour of "q" key in the menus + ## v1.0.22 * Fixed: Bad values for disks and network on 32-bit diff --git a/src/btop.cpp b/src/btop.cpp index f49189e..b7fea4b 100644 --- a/src/btop.cpp +++ b/src/btop.cpp @@ -53,7 +53,7 @@ namespace Global { {"#801414", "██████╔╝ ██║ ╚██████╔╝██║ ╚═╝ ╚═╝"}, {"#000000", "╚═════╝ ╚═╝ ╚═════╝ ╚═╝"}, }; - const string Version = "1.0.22"; + const string Version = "1.0.23"; int coreCount; string overlay; -- cgit v1.2.3 From e717606938526404ed77cb5c51b8657a21b43bcb Mon Sep 17 00:00:00 2001 From: aristocratos Date: Mon, 8 Nov 2021 19:29:02 +0100 Subject: Changed: Collection ordering --- src/btop.cpp | 65 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/src/btop.cpp b/src/btop.cpp index b7fea4b..273bc83 100644 --- a/src/btop.cpp +++ b/src/btop.cpp @@ -414,84 +414,83 @@ namespace Runner { //* Run collection and draw functions for all boxes try { - //? PROC - if (v_contains(conf.boxes, "proc")) { + //? CPU + if (v_contains(conf.boxes, "cpu")) { try { - if (Global::debug) debug_timer("proc", collect_begin); + if (Global::debug) debug_timer("cpu", collect_begin); //? Start collect - auto proc = Proc::collect(conf.no_update); + auto cpu = Cpu::collect(conf.no_update); - if (Global::debug) debug_timer("proc", draw_begin); + if (Global::debug) debug_timer("cpu", draw_begin); //? Draw box - if (not pause_output) output += Proc::draw(proc, conf.force_redraw, conf.no_update); + if (not pause_output) output += Cpu::draw(cpu, conf.force_redraw, conf.no_update); - if (Global::debug) debug_timer("proc", draw_done); + if (Global::debug) debug_timer("cpu", draw_done); } catch (const std::exception& e) { - throw std::runtime_error("Proc:: -> " + (string)e.what()); + throw std::runtime_error("Cpu:: -> " + (string)e.what()); } } - - //? NET - if (v_contains(conf.boxes, "net")) { + //? MEM + if (v_contains(conf.boxes, "mem")) { try { - if (Global::debug) debug_timer("net", collect_begin); + if (Global::debug) debug_timer("mem", collect_begin); //? Start collect - auto net = Net::collect(conf.no_update); + auto mem = Mem::collect(conf.no_update); - if (Global::debug) debug_timer("net", draw_begin); + if (Global::debug) debug_timer("mem", draw_begin); //? Draw box - if (not pause_output) output += Net::draw(net, conf.force_redraw, conf.no_update); + if (not pause_output) output += Mem::draw(mem, conf.force_redraw, conf.no_update); - if (Global::debug) debug_timer("net", draw_done); + if (Global::debug) debug_timer("mem", draw_done); } catch (const std::exception& e) { - throw std::runtime_error("Net:: -> " + (string)e.what()); + throw std::runtime_error("Mem:: -> " + (string)e.what()); } } - //? MEM - if (v_contains(conf.boxes, "mem")) { + //? NET + if (v_contains(conf.boxes, "net")) { try { - if (Global::debug) debug_timer("mem", collect_begin); + if (Global::debug) debug_timer("net", collect_begin); //? Start collect - auto mem = Mem::collect(conf.no_update); + auto net = Net::collect(conf.no_update); - if (Global::debug) debug_timer("mem", draw_begin); + if (Global::debug) debug_timer("net", draw_begin); //? Draw box - if (not pause_output) output += Mem::draw(mem, conf.force_redraw, conf.no_update); + if (not pause_output) output += Net::draw(net, conf.force_redraw, conf.no_update); - if (Global::debug) debug_timer("mem", draw_done); + if (Global::debug) debug_timer("net", draw_done); } catch (const std::exception& e) { - throw std::runtime_error("Mem:: -> " + (string)e.what()); + throw std::runtime_error("Net:: -> " + (string)e.what()); } } - //? CPU - if (v_contains(conf.boxes, "cpu")) { + //? PROC + if (v_contains(conf.boxes, "proc")) { try { - if (Global::debug) debug_timer("cpu", collect_begin); + if (Global::debug) debug_timer("proc", collect_begin); //? Start collect - auto cpu = Cpu::collect(conf.no_update); + auto proc = Proc::collect(conf.no_update); - if (Global::debug) debug_timer("cpu", draw_begin); + if (Global::debug) debug_timer("proc", draw_begin); //? Draw box - if (not pause_output) output += Cpu::draw(cpu, conf.force_redraw, conf.no_update); + if (not pause_output) output += Proc::draw(proc, conf.force_redraw, conf.no_update); - if (Global::debug) debug_timer("cpu", draw_done); + if (Global::debug) debug_timer("proc", draw_done); } catch (const std::exception& e) { - throw std::runtime_error("Cpu:: -> " + (string)e.what()); + throw std::runtime_error("Proc:: -> " + (string)e.what()); } } } -- cgit v1.2.3 From eb19bb3fd6a81cddbbccacadcd0bc05a613116ad Mon Sep 17 00:00:00 2001 From: aristocratos Date: Mon, 8 Nov 2021 19:39:16 +0100 Subject: Fixed: Restore all escape seq mouse modes on exit --- src/btop_tools.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/btop_tools.hpp b/src/btop_tools.hpp index c9f9b74..218fbca 100644 --- a/src/btop_tools.hpp +++ b/src/btop_tools.hpp @@ -100,7 +100,7 @@ namespace Term { const string clear_end = Fx::e + "0J"; const string clear_begin = Fx::e + "1J"; const string mouse_on = Fx::e + "?1002h" + Fx::e + "?1015h" + Fx::e + "?1006h"; //? Enable reporting of mouse position on click and release - const string mouse_off = Fx::e + "?1002l"; + const string mouse_off = Fx::e + "?1002l" + Fx::e + "?1015l" + Fx::e + "?1006l"; const string mouse_direct_on = Fx::e + "?1003h"; //? Enable reporting of mouse position at any movement const string mouse_direct_off = Fx::e + "?1003l"; const string sync_start = Fx::e + "?2026h"; //? Start of terminal synchronized output -- cgit v1.2.3 From 41f1e9e0a746c0ab93af226920a060072de5c708 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Mon, 8 Nov 2021 20:35:16 +0100 Subject: Fixed: SIGINT not cleaning up on exit --- src/btop.cpp | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/btop.cpp b/src/btop.cpp index 273bc83..44565b7 100644 --- a/src/btop.cpp +++ b/src/btop.cpp @@ -79,6 +79,8 @@ namespace Global { atomic resized (false); atomic quitting (false); + atomic should_quit (false); + atomic should_sleep (false); atomic _runner_started (false); bool arg_tty = false; @@ -254,10 +256,24 @@ void _exit_handler() { void _signal_handler(const int sig) { switch (sig) { case SIGINT: - clean_quit(0); + if (Runner::active) { + Global::should_quit = true; + Runner::stopping = true; + Input::interrupt = true; + } + else { + clean_quit(0); + } break; case SIGTSTP: - _sleep(); + if (Runner::active) { + Global::should_sleep = true; + Runner::stopping = true; + Input::interrupt = true; + } + else { + _sleep(); + } break; case SIGCONT: _resume(); @@ -363,10 +379,10 @@ namespace Runner { //? ------------------------------- Secondary thread: async launcher and drawing ---------------------------------- void * _runner(void * _) { (void)_; - //? Block all signals in this thread to avoid deadlock from any signal handlers trying to stop this thread + //? Block some signals in this thread to avoid deadlock from any signal handlers trying to stop this thread sigemptyset(&mask); - sigaddset(&mask, SIGINT); - sigaddset(&mask, SIGTSTP); + // sigaddset(&mask, SIGINT); + // sigaddset(&mask, SIGTSTP); sigaddset(&mask, SIGWINCH); sigaddset(&mask, SIGTERM); pthread_sigmask(SIG_BLOCK, &mask, NULL); @@ -842,6 +858,8 @@ int main(int argc, char **argv) { while (not true not_eq not false) { //? Check for exceptions in secondary thread and exit with fail signal if true if (Global::thread_exception) exit(1); + else if (Global::should_quit) exit(0); + else if (Global::should_sleep) { Global::should_sleep = false; _sleep(); } //? Make sure terminal size hasn't changed (in case of SIGWINCH not working properly) term_resize(); -- cgit v1.2.3 From 81df582687895646649100df2150e064334d1fd8 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Tue, 9 Nov 2021 10:03:37 +0100 Subject: v1.0.24 Bug fixes --- CHANGELOG.md | 8 ++++++++ src/btop.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bce917..d134d7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## v1.0.24 + +* Changed: Collection ordering + +* Fixed: Restore all escape seq mouse modes on exit + +* Fixed: SIGINT not cleaning up on exit + ## v1.0.23 * Fixed: Config parser missing first value when not including version header diff --git a/src/btop.cpp b/src/btop.cpp index 44565b7..fd9b5f2 100644 --- a/src/btop.cpp +++ b/src/btop.cpp @@ -53,7 +53,7 @@ namespace Global { {"#801414", "██████╔╝ ██║ ╚██████╔╝██║ ╚═╝ ╚═╝"}, {"#000000", "╚═════╝ ╚═╝ ╚═════╝ ╚═╝"}, }; - const string Version = "1.0.23"; + const string Version = "1.0.24"; int coreCount; string overlay; -- cgit v1.2.3 From 7ca4940debb80f642da07caaee580f8cf11b8ebd Mon Sep 17 00:00:00 2001 From: aristocratos Date: Sat, 13 Nov 2021 21:19:18 +0100 Subject: Added OSX fixes for upcoming merge --- Makefile | 46 ++++++++++++++++++++++++++++++++++++---------- src/btop.cpp | 13 ++++++++++++- 2 files changed, 48 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 7fe9f4d..72afbff 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,11 @@ BANNER = \n \033[38;5;196m██████\033[38;5;240m╗ \033[38;5;196m█ override BTOP_VERSION := $(shell head -n100 src/btop.cpp 2>/dev/null | grep "Version =" | cut -f2 -d"\"" || echo " unknown") override TIMESTAMP := $(shell date +%s 2>/dev/null || echo "0") +ifeq ($(shell command -v gdate >/dev/null; echo $$?),0) + DATE_CMD := gdate +else + DATE_CMD := date +endif ifneq ($(QUIET),true) override PRE := info info-quiet @@ -16,15 +21,25 @@ PREFIX ?= /usr/local #? Detect PLATFORM and ARCH from uname/gcc if not set PLATFORM ?= $(shell uname -s || echo unknown) -ifneq ($(filter unknown darwin, $(PLATFORM)),) +ifneq ($(filter unknown Darwin, $(PLATFORM)),) override PLATFORM := $(shell $(CXX) -dumpmachine | awk -F"-" '{ print (NF==4) ? $$3 : $$2 }') + ifeq ($(PLATFORM),apple) + override PLATFORM := macos + endif +endif +ifeq ($(shell uname -v | grep ARM64 >/dev/null 2>&1; echo $$?),0) + ARCH ?= arm64 +else + ARCH ?= $(shell $(CXX) -dumpmachine | cut -d "-" -f 1) endif -ARCH ?= $(shell $(CXX) -dumpmachine | cut -d "-" -f 1) override PLATFORM_LC := $(shell echo $(PLATFORM) | tr '[:upper:]' '[:lower:]') #? Any flags added to TESTFLAGS must not contain whitespace for the testing to work -override TESTFLAGS := -fexceptions -fcf-protection -fstack-protector -fstack-clash-protection +override TESTFLAGS := -fexceptions -fstack-clash-protection -fcf-protection +ifneq ($(PLATFORM) $(ARCH),macos arm64) + override TESTFLAGS += -fstack-protector +endif ifeq ($(STATIC),true) override ADDFLAGS += -DSTATIC_BUILD -static -static-libgcc -static-libstdc++ -Wl,--fatal-warnings @@ -35,12 +50,22 @@ ifeq ($(STRIP),true) endif #? Compiler and Linker -CXX ?= g++ +ifeq ($(shell command -v g++-11 >/dev/null; echo $$?),0) + CXX := g++-11 +else ifeq ($(shell command -v g++11 >/dev/null; echo $$?),0) + CXX := g++11 +else ifeq ($(shell command -v g++ >/dev/null; echo $$?),0) + CXX := g++ +endif override CXX_VERSION := $(shell $(CXX) -dumpfullversion -dumpversion || echo 0) #? Try to make sure we are using GCC/G++ version 11 or later if not instructed to use g++-10 ifeq ($(CXX),g++) - V_MAJOR := $(shell echo $(CXX_VERSION) | cut -f1 -d".") + ifeq ($(shell g++ --version | grep clang >/dev/null 2>&1; echo $$?),0) + V_MAJOR := 0 + else + V_MAJOR := $(shell echo $(CXX_VERSION) | cut -f1 -d".") + endif ifneq ($(shell test $(V_MAJOR) -ge 11; echo $$?),0) ifeq ($(shell command -v g++-11 >/dev/null; echo $$?),0) override CXX := g++-11 @@ -115,6 +140,7 @@ info: @printf "\033[1;95mLDFLAGS \033[1;92m+| \033[0;37m\$$(\033[93mLDCXXFLAGS\033[37m) \$$(\033[94mOPTFLAGS\033[37m) \$$(\033[91mWARNFLAGS\033[37m)\n" info-quiet: + @sleep 0.1 2>/dev/null || true @printf "\n\033[1;92mBuilding btop++ \033[91m(\033[97mv$(BTOP_VERSION)\033[91m) \033[93m$(PLATFORM) \033[96m$(ARCH)\033[0m\n" help: @@ -176,17 +202,17 @@ uninstall: #? Link .ONESHELL: btop: $(OBJECTS) - @sleep 0.1 2>/dev/null || true + @sleep 0.2 2>/dev/null || true @TSTAMP=$$(date +%s 2>/dev/null || echo "0") @$(QUIET) || printf "\n\033[1;92mLinking and optimizing binary\033[37m...\033[0m\n" @$(CXX) -o $(TARGETDIR)/btop $^ $(LDFLAGS) || exit 1 - @printf "\033[1;92m-> \033[1;37m$(TARGETDIR)/btop \033[100D\033[35C\033[1;93m(\033[1;97m$$(du -ah $(TARGETDIR)/btop | cut -f1)iB\033[1;93m) \033[92m(\033[97m$$(date -d @$$(expr $$(date +%s 2>/dev/null || echo "0") - $${TSTAMP} 2>/dev/null) -u +%Mm:%Ss 2>/dev/null | sed 's/^00m://' || echo '')\033[92m)\033[0m\n" - printf "\n\033[1;92mBuild complete in \033[92m(\033[97m$$(date -d @$$(expr $$(date +%s 2>/dev/null || echo "0") - $(TIMESTAMP) 2>/dev/null) -u +%Mm:%Ss 2>/dev/null | sed 's/^00m://' || echo "unknown")\033[92m)\033[0m\n" + @printf "\033[1;92m-> \033[1;37m$(TARGETDIR)/btop \033[100D\033[35C\033[1;93m(\033[1;97m$$(du -ah $(TARGETDIR)/btop | cut -f1)iB\033[1;93m) \033[92m(\033[97m$$($(DATE_CMD) -d @$$(expr $$(date +%s 2>/dev/null || echo "0") - $${TSTAMP} 2>/dev/null) -u +%Mm:%Ss 2>/dev/null | sed 's/^00m://' || echo '')\033[92m)\033[0m\n" + @printf "\n\033[1;92mBuild complete in \033[92m(\033[97m$$($(DATE_CMD) -d @$$(expr $$(date +%s 2>/dev/null || echo "0") - $(TIMESTAMP) 2>/dev/null) -u +%Mm:%Ss 2>/dev/null | sed 's/^00m://' || echo "unknown")\033[92m)\033[0m\n" #? Compile .ONESHELL: $(BUILDDIR)/%.$(OBJEXT): $(SRCDIR)/%.$(SRCEXT) - @sleep 0.1 2>/dev/null || true + @sleep 0.3 2>/dev/null || true @TSTAMP=$$(date +%s 2>/dev/null || echo "0") @$(QUIET) || printf "\033[1;97mCompiling $<\033[0m\n" @$(CXX) $(CXXFLAGS) $(INC) -c -o $@ $< || exit 1 @@ -195,7 +221,7 @@ $(BUILDDIR)/%.$(OBJEXT): $(SRCDIR)/%.$(SRCEXT) @sed -e 's|.*:|$(BUILDDIR)/$*.$(OBJEXT):|' < $(BUILDDIR)/$*.$(DEPEXT).tmp > $(BUILDDIR)/$*.$(DEPEXT) @sed -e 's/.*://' -e 's/\\$$//' < $(BUILDDIR)/$*.$(DEPEXT).tmp | fmt -1 | sed -e 's/^ *//' -e 's/$$/:/' >> $(BUILDDIR)/$*.$(DEPEXT) @rm -f $(BUILDDIR)/$*.$(DEPEXT).tmp - @printf "\033[1;92m-> \033[1;37m$@ \033[100D\033[35C\033[1;93m(\033[1;97m$$(du -ah $@ | cut -f1)iB\033[1;93m) \033[92m(\033[97m$$(date -d @$$(expr $$(date +%s 2>/dev/null || echo "0") - $${TSTAMP} 2>/dev/null) -u +%Mm:%Ss 2>/dev/null | sed 's/^00m://' || echo '')\033[92m)\033[0m\n" + @printf "\033[1;92m-> \033[1;37m$@ \033[100D\033[35C\033[1;93m(\033[1;97m$$(du -ah $@ | cut -f1)iB\033[1;93m) \033[92m(\033[97m$$($(DATE_CMD) -d @$$(expr $$(date +%s 2>/dev/null || echo "0") - $${TSTAMP} 2>/dev/null) -u +%Mm:%Ss 2>/dev/null | sed 's/^00m://' || echo '')\033[92m)\033[0m\n" #? Non-File Targets .PHONY: all msg help pre diff --git a/src/btop.cpp b/src/btop.cpp index fd9b5f2..b9be5e8 100644 --- a/src/btop.cpp +++ b/src/btop.cpp @@ -201,12 +201,19 @@ void clean_quit(int sig) { Global::quitting = true; Runner::stop(); if (Global::_runner_started) { + #ifdef __APPLE__ + if (pthread_join(Runner::runner_id, NULL) != 0) { + Logger::error("Failed to join _runner thread!"); + pthread_cancel(Runner::runner_id); + } + #else struct timespec ts; ts.tv_sec = 5; if (pthread_timedjoin_np(Runner::runner_id, NULL, &ts) != 0) { Logger::error("Failed to join _runner thread!"); pthread_cancel(Runner::runner_id); } + #endif } Config::write(); @@ -229,9 +236,11 @@ void clean_quit(int sig) { Logger::info("Quitting! Runtime: " + sec_to_dhms(time_s() - Global::start_time)); //? Assume error if still not cleaned up and call quick_exit to avoid a segfault from Tools::atomic_lock destructor +#ifndef __APPLE__ if (Tools::active_locks > 0) { quick_exit((sig != -1 ? sig : 0)); } +#endif if (sig != -1) exit(sig); } @@ -311,7 +320,7 @@ namespace Runner { pthread_mutex_t& pt_mutex; public: int status; - thread_lock(pthread_mutex_t& mtx) : pt_mutex(mtx) { status = pthread_mutex_lock(&pt_mutex); } + thread_lock(pthread_mutex_t& mtx) : pt_mutex(mtx) { pthread_mutex_init(&mtx, NULL); status = pthread_mutex_lock(&pt_mutex); } ~thread_lock() { if (status == 0) pthread_mutex_unlock(&pt_mutex); } }; @@ -778,10 +787,12 @@ int main(int argc, char **argv) { Config::set("tty_mode", true); Logger::info("Forcing tty mode: setting 16 color mode and using tty friendly graph symbols"); } +#ifndef __APPLE__ else if (not Global::arg_tty and Term::current_tty.starts_with("/dev/tty")) { Config::set("tty_mode", true); Logger::info("Real tty detected: setting 16 color mode and using tty friendly graph symbols"); } +#endif //? Check for valid terminal dimensions { -- cgit v1.2.3 From 4926acda5f32dd342060cac9832ad67983d50fc4 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Sat, 13 Nov 2021 21:25:08 +0100 Subject: Makefile OSX and freebsd fixes --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 72afbff..42ff6c1 100644 --- a/Makefile +++ b/Makefile @@ -78,12 +78,18 @@ endif ifeq ($(PLATFORM_LC),linux) PLATFORM_DIR := linux THREADS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1) + SU_GROUP := root else ifeq ($(PLATFORM_LC),freebsd) PLATFORM_DIR := freebsd THREADS := $(shell getconf NPROCESSORS_ONLN 2>/dev/null || echo 1) -else ifeq ($(PLATFORM_LC),apple) + SU_GROUP := root + override ADDFLAGS += -lstdc++ -lm -lkvm -Wl,-rpath=/usr/local/lib/gcc11 + export MAKE = gmake +else ifeq ($(PLATFORM_LC),macos) PLATFORM_DIR := osx THREADS := $(shell sysctl -n hw.ncpu || echo 1) + override ADDFLAGS += -framework IOKit -framework CoreFoundation -Wno-format-truncation + SU_GROUP := wheel else $(error $(shell printf "\033[1;91mERROR: \033[97mUnsupported platform ($(PLATFORM))\033[0m")) endif @@ -115,7 +121,6 @@ override CXXFLAGS += $(REQFLAGS) $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS) override LDFLAGS += $(LDCXXFLAGS) $(OPTFLAGS) $(WARNFLAGS) INC := -I$(INCDIR) -I$(SRCDIR) SU_USER := root -SU_GROUP := root SOURCES := $(shell find $(SRCDIR) -maxdepth 1 -type f -name *.$(SRCEXT)) -- cgit v1.2.3 From c0e17a64d32ee313b27048a182fea9d737e3e177 Mon Sep 17 00:00:00 2001 From: aristocratos Date: Sat, 13 Nov 2021 23:31:01 +0100 Subject: Squashed commit of the following: commit c2c4fe47db3002c3433114954c22bd92b149bea0 Author: aristocratos Date: Sat Nov 13 23:15:53 2021 +0100 Changes from main + fixes commit bd5d86708907397f7fc40868ff3665e23f24bb8a Author: aristocratos Date: Sat Nov 13 21:24:01 2021 +0100 Fixes commit dc5f0606cbe6f4d61bec3621c25190f1241b3fce Author: aristocratos Date: Sat Nov 13 20:51:06 2021 +0100 Fixed leak in Proc::collect() commit 8b59ab6e1120439a070b07a4255b10bd7d5197cf Author: aristocratos Date: Sat Nov 13 19:59:56 2021 +0100 Fixed process cpu usage calculation commit 53c8a0325b7567b84da2f01ebd5acad33db4c0cb Author: aristocratos Date: Mon Oct 25 13:01:53 2021 +0200 Cpu temp set to average of pACC and eACC for mac m1 commit 940cd0a5131253b0595b233f9da350101211d3cb Author: Jos Dehaes Date: Sun Oct 24 21:12:16 2021 +0200 limit cpu temp to 20 commit 254ceb9c2df0374ad07a6ca1e867ef40a60efc24 Author: aristocratos Date: Sun Oct 24 11:24:04 2021 +0200 Fixed up Makefile commit 6fa3bf41d757edbb311b99292b26aa45e83d9b9d Author: aristocratos Date: Thu Oct 21 13:12:45 2021 +0200 Makefile fixed WARNFLAGS commit 2c98e2ca2927d772674c130dcc527f3318daf150 Author: aristocratos Date: Thu Oct 21 13:08:12 2021 +0200 Updated Makefile commit e69780e9bce7af37ba6a85843db0e97c55c61395 Author: Jos Dehaes Date: Wed Oct 20 23:26:09 2021 +0200 fix build commit de6216792154477a5ab7f564c9467761daf842e2 Merge: a590dd3 a0ee404 Author: Jos Dehaes Date: Wed Oct 20 23:10:36 2021 +0200 Merge branch 'main' into OSX commit a590dd3f67c9f2f8f8dc3fa49920a40a5e8b369d Author: aristocratos Date: Mon Oct 18 11:20:12 2021 +0200 Ignore format-truncation commit 4c30742d412cf552de22b3746a68cd62bfe867f2 Author: Jos Dehaes Date: Mon Oct 18 10:08:01 2021 +0200 comments about temp sensors commit 46030de77cb1409eb8b0247c331408a240b0227a Author: Jos Dehaes Date: Mon Oct 18 08:10:37 2021 +0200 available = total - used commit 4c228de0ef8a75275178bad081e568f85fc579fd Author: Jos Dehaes Date: Sun Oct 17 22:19:41 2021 +0200 use sysconf to get arg_max - seems simpler commit c60fc29f0f62831730c04c23cd9ffbefef50a1d8 Author: Jos Dehaes Date: Sun Oct 17 22:10:50 2021 +0200 arg_max should be int on macos commit 0b5a931a6d5e8d1a434e88e8fd0613ab948995fa Author: Jos Dehaes Date: Sun Oct 17 22:01:42 2021 +0200 only fetch max_args once commit 71d5cd5fd91511a90e43e5e6dbf7a1b6a3c3f9c8 Author: aristocratos Date: Sat Oct 16 23:24:07 2021 +0200 Reverted mutexes back to custom atomic bool based locks commit 3f34a67df68f3f451cb48b023b7cd42ccf933ce4 Author: Jos Dehaes Date: Sat Oct 16 21:47:55 2021 +0200 these helpers can be static commit fc19c46c8aab03e252f60f6f9447d7e1861cbcb9 Author: Jos Dehaes Date: Sat Oct 16 21:44:49 2021 +0200 code cleanup: put the code in .cpp to enable incremental build commit c252c618c043c4b85783f56363121877d0db0727 Author: Jos Dehaes Date: Sat Oct 16 21:09:21 2021 +0200 don't crash on intel commit 9f88187c29821148c7a5272926d204bd3eb39f89 Author: Jos Dehaes Date: Sat Oct 16 21:06:18 2021 +0200 small improvement commit 808f09c97465e8cf511f7690b40a69cd8a2efa15 Author: Jos Dehaes Date: Sat Oct 16 20:59:48 2021 +0200 don't iterate 3 times commit d8408336e3b8336025a087a2bf79a2d15f51ee66 Author: Jos Dehaes Date: Sat Oct 16 20:59:27 2021 +0200 remove debug commit 4f078c3beb960fe06f4d8b44b9c913e2aacf7625 Author: Jos Dehaes Date: Wed Oct 13 23:38:27 2021 +0200 more temperature (M1 + intel) commit 289880aaa6d1a3625c01e9d7643138343b29db53 Merge: 88a2528 3ffb212 Author: aristocratos Date: Sat Oct 16 19:37:09 2021 +0200 Merge branch 'OSX' of github.com:aristocratos/btop into OSX commit 88a2528ca3a2390f2c94c7f1a18ba982a5e5f2b2 Author: aristocratos Date: Sat Oct 16 19:34:10 2021 +0200 Merge changes from main commit 3ffb21203aa3f4ad978533a3f2b1e67e636381ea Author: Jos Dehaes Date: Sat Oct 16 19:20:45 2021 +0200 release a bit more - still has negative temps for 2 cores on my system commit 70b48710626ba22df496ba741625ce03cba6abbd Author: aristocratos Date: Sat Oct 16 01:59:44 2021 +0200 Fixed leaks in Mem and attempt at fixing leaks in sensors.cpp commit fbae907720afbae47162666b6b0aea974be80c07 Author: Jos Dehaes Date: Fri Oct 15 23:41:37 2021 +0200 temperature sensors via IOKit commit cef0f0a68daa88a380000ce200a364e4701ba93a Author: aristocratos Date: Fri Oct 15 18:39:17 2021 +0200 Process command line arguments commit 921cfa01ffc104c57f2825d0bca648233ddff191 Author: aristocratos Date: Wed Oct 13 23:20:15 2021 +0200 Re-enable setuid and set default SU_GROUP to wheel for OSX commit a416c888c7356634ef7a5286130a56160d72f50a Author: Jos Dehaes Date: Wed Oct 13 21:16:41 2021 +0200 temperature commit e7afe00ce7960bfe6fb6ba2a9a2f5d498c5b4fca Author: aristocratos Date: Wed Oct 13 12:54:43 2021 +0200 Cpu usage working again commit 4193ef8921617e48ce07ce95d898386f7dd77f43 Author: aristocratos Date: Wed Oct 13 10:36:51 2021 +0200 Fixed cpu lazy sorting commit 93fcb6ff04d84c008ed9f7d28918eb9eb8adf740 Author: aristocratos Date: Tue Oct 12 22:22:45 2021 +0200 Update README.md commit 683354cd2ed8add79c6940e51800431e8b020635 Merge: 8a399c4 6d724d6 Author: aristocratos Date: Tue Oct 12 22:19:30 2021 +0200 Merge pull request #80 from ShrirajHegde/OSX Add github workflow for MacOS commit 8a399c499af87883a7e4b2cf7f6d193f76909923 Author: aristocratos Date: Tue Oct 12 21:50:46 2021 +0200 pointer to smart pointer, first pass commit 772605003af9c1c00f163ff75279cd0055074c96 Author: aristocratos Date: Tue Oct 12 18:54:38 2021 +0200 Fixed detailed memory not updating commit 28cb67753332fe8c93d23cbf8e4db636fc6823d6 Author: Jos Dehaes Date: Mon Oct 11 22:19:25 2021 +0200 more memory free-up - still leaks like crazy commit 304457863f6cdccf82fbe1cca3078c7f5d9f97cd Author: Jos Dehaes Date: Mon Oct 11 21:48:07 2021 +0200 more RAII cleanup commit 82e2e3c55c23e37dbf226952cca4587df3522fa3 Author: aristocratos Date: Mon Oct 11 12:40:25 2021 +0200 Removed non present cpu fields and fixed calculation for selectable cpu field graphs commit 68603f2b37e34828f78f0f675f66bd835dae8325 Author: aristocratos Date: Mon Oct 11 10:57:04 2021 +0200 RAII Wrappers for Cpu::get_battery() commit d5cb24fbeb19ae57507e1715aa402b2dc33f9b6b Author: Jos Dehaes Date: Sun Oct 10 20:23:11 2021 +0200 RAII commit 8fad5a61bee973c22f3a11fd7fee2c4e40390bbb Author: Jos Dehaes Date: Sat Oct 9 21:44:16 2021 +0200 get more disk IO stats commit 7fa903cf160b391fb316ea32a60984921a174066 Author: Jos Dehaes Date: Sat Oct 9 21:43:48 2021 +0200 fix build commit 98036db660e306626d41fb1b67d9938d9ffe168a Author: Jos Dehaes Date: Sat Oct 9 21:18:25 2021 +0200 remove unnecessary uptime param commit aae7ae35caec64ba611d9b78b24c0ad2716f333e Author: Jos Dehaes Date: Sat Oct 9 21:07:23 2021 +0200 remove debug logging commit 5187420b04973edcdd25c1b639795a2c8539b2d9 Author: Jos Dehaes Date: Sat Oct 9 21:06:43 2021 +0200 fix process elapsed time commit 89582c0ea6e9bdd7a658b5583d2ce2c5deeee8b0 Author: Jos Dehaes Date: Sat Oct 9 21:06:29 2021 +0200 don't double free commit 6d724d6155bad8c084e4c9bdb1d7dda13543a5ac Author: Shriraj Hegde Date: Sat Oct 9 21:46:33 2021 +0530 Change Upload filename commit 4f94ecc8ad7d7cdb7daed82fd98a5634d723ec6b Author: Shriraj Hegde Date: Sat Oct 9 21:40:11 2021 +0530 Fix upload path commit e1d6d0a1f224474417078a0a1b98a6c4b5c94a53 Author: Shriraj Hegde Date: Sat Oct 9 21:36:13 2021 +0530 Skip installing gcc via Homebrew Change job name commit 02cdd9d759d163519048d24746273e4eda2149d0 Author: Shriraj Hegde Date: Sat Oct 9 21:30:40 2021 +0530 Fix uploading Remove distclean commit 39eb6c396fc31f798d23c21e7f4b313930dca982 Author: Shriraj Hegde Date: Sat Oct 9 21:26:57 2021 +0530 Disable static compilation commit 099592bccdafe8d8d8c421bcad3e036cbea580ce Author: aristocratos Date: Sat Oct 9 17:52:10 2021 +0200 Ignore empty pid 0 to fix tree mode commit a28e17556e74bb618fc2b6eb74f250b139406cdd Author: Shriraj Hegde Date: Sat Oct 9 21:17:11 2021 +0530 Add workflow for MacOS commit aee9179c0a98bce54b55c8bb8ebdc1ac99bad69e Author: aristocratos Date: Sat Oct 9 17:36:46 2021 +0200 Disable failed tty mode detection for OSX commit 4b7b98058d7190a494fa522834217d786d71e5fb Author: aristocratos Date: Sat Oct 9 11:28:32 2021 +0200 Fixed disk io and added io activity based on read/write commit bfa0629e7d1e50f88d9a1207930e2f39270fc189 Author: Jos Dehaes Date: Fri Oct 8 22:28:10 2021 +0200 fill in 0 for ioticks commit a016ff8a039634bc37a22a4a84b31055b3cfab37