Files
termux-packages/root-packages/btop/disable-pthread.patch
termux-pacman-bot ea9e6a9b63 bump(root/btop): 1.4.6
- Fixes https://github.com/termux/termux-packages/issues/27760

- Rebase `CMakeLists.txt.patch`

- Rebase `disable_pthread.patch`

- Rebase `improve-cpu-sensor-guessing.patch` (after https://github.com/aristocratos/btop/pull/1319, `s_contains()` -> `std::string::contains()` avoids `error: use of undeclared identifier 's_contains'`)
2025-12-29 08:46:25 +00:00

40 lines
1.2 KiB
Diff

diff --git a/src/btop.cpp b/src/btop.cpp
index ffd5ee6..21568d6 100644
--- a/src/btop.cpp
+++ b/src/btop.cpp
@@ -202,12 +202,6 @@ void clean_quit(int sig) {
Logger::warning("Failed to join _runner thread on exit!");
pthread_cancel(Runner::runner_id);
}
- #else
- constexpr struct timespec ts { .tv_sec = 5, .tv_nsec = 0 };
- if (pthread_timedjoin_np(Runner::runner_id, nullptr, &ts) != 0) {
- Logger::warning("Failed to join _runner thread on exit!");
- pthread_cancel(Runner::runner_id);
- }
#endif
}
@@ -738,20 +738,7 @@ namespace Runner {
if (active) {
Logger::error("Stall in Runner thread, restarting!");
active = false;
- // exit(1);
- pthread_cancel(Runner::runner_id);
-
- // Wait for the thread to actually terminate before creating a new one
- void* thread_result;
- int join_result = pthread_join(Runner::runner_id, &thread_result);
- if (join_result != 0) {
- Logger::warning("Failed to join cancelled thread: " + string(strerror(join_result)));
- }
-
- if (pthread_create(&Runner::runner_id, nullptr, &Runner::_runner, nullptr) != 0) {
- Global::exit_error_msg = "Failed to re-create _runner thread!";
- clean_quit(1);
- }
+ exit(1);
}
if (stopping or Global::resized) return;