From 2557419d4d8f51765f9e75fa41057893517ff591 Mon Sep 17 00:00:00 2001 From: mrkmntal Date: Sat, 29 Aug 2026 15:29:59 -0400 Subject: [PATCH] Finalizing changes for 0.4 --- DEVLOG.md | 13 +++++++++++++ README.md | 9 ++++++--- main.cpp | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/DEVLOG.md b/DEVLOG.md index f786a35..f98c74e 100644 --- a/DEVLOG.md +++ b/DEVLOG.md @@ -1,5 +1,18 @@ # Tux-Dock Development Log +## 0.4-beta + +### ARM64 / tuxreaperd fixes + +- Fixed `tuxreaperdasm.c` on ARM64 by using the architecture-specific `O_DIRECTORY` value (`0x4000` on `aarch64`, `0x10000` on `x86_64`). The hardcoded x86_64 value caused `openat("/proc", ...)` to fail with `EINVAL`, which broke `/proc` scanning, descendant waiting, and SIGTERM forwarding on ARM64 Chromebooks/VMs. +- Verified graceful Apache shutdown on ARM64: tuxreaperd remaps `SIGTERM` to `SIGWINCH` for Apache processes and waits for descendants to finish, allowing in-flight HTTP responses to complete before the container exits. +- Added `--debug-reaper` flag to `compile.sh` to build tuxreaperd with `TUXREAPERD_DEBUG` and run verbose tests; useful for diagnosing `/proc` scanning, signal broadcasts, and descendant waits. +- Added adaptive TTY/non-TTY spinner to `compile.sh` for clearer feedback during the test phase. + +### Version + +- Bumped version to `0.4-beta`. + ## 0.3.1-beta Added an optional timeout_seconds parameter to stopContainer diff --git a/README.md b/README.md index 9f8c73a..f63c700 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ It gives you a guided, keyboard-first TUI for common Docker operations without m - Direct `fork`/`exec` process execution for CLI-backed streaming and interactive commands. - Persistent container listings that retain exited containers. - Robust stop handling with state polling, timeout retry, and idempotent stop responses. -- `tuxreaperd` micro init system: a tiny statically-linked C daemon mounted into created containers as PID 1, acting as a subreaper so orphaned processes never linger as zombies, broadcasting lifecycle signals (SIGTERM, SIGQUIT, SIGINT, SIGHUP, SIGUSR1, SIGUSR2) to the whole process tree via `kill(-1, sig)`, and propagating exit status. [Processes don't fear tuxreaperd!](tuxreaperdpromo.jpg) +- `tuxreaperd` micro init system: a tiny statically-linked C daemon mounted into created containers as PID 1, acting as a subreaper so orphaned processes never linger as zombies, broadcasting lifecycle signals (SIGTERM, SIGQUIT, SIGINT, SIGHUP, SIGUSR1, SIGUSR2) to the whole process tree via `kill(-1, sig)`, and propagating exit status. Includes architecture-specific `O_DIRECTORY` handling for `x86_64` and `aarch64`, plus Apache-aware `SIGTERM`→`SIGWINCH` remapping for graceful shutdown on both architectures. [Processes don't fear tuxreaperd!](tuxreaperdpromo.jpg) - About screen in-app with project/version/repository info. --- @@ -55,9 +55,12 @@ sudo ./build/tux-dock # Force the libc-based tuxreaperd implementation ./compile.sh --force-libc-reaper + +# Build with verbose tuxreaperd debug output during tests +./compile.sh --debug-reaper ``` -`compile.sh` builds the `tuxreaperd` micro init before the main project. On supported hosts (`x86_64`/`amd64`/`aarch64`/`arm64`) it first tries the freestanding syscall implementation in `tuxreaperdasm.c`; on other architectures, or if the freestanding build fails, it falls back to the standard POSIX implementation in `tuxreaperdgnu.c`. Pass `--force-libc-reaper` to skip the freestanding build and use the libc implementation directly. +`compile.sh` builds the `tuxreaperd` micro init before the main project. On supported hosts (`x86_64`/`amd64`/`aarch64`/`arm64`) it first tries the freestanding syscall implementation in `tuxreaperdasm.c`; on other architectures, or if the freestanding build fails, it falls back to the standard POSIX implementation in `tuxreaperdgnu.c`. Pass `--force-libc-reaper` to skip the freestanding build and use the libc implementation directly. Pass `--debug-reaper` to build tuxreaperd with `TUXREAPERD_DEBUG` and run tests with verbose output, showing the reaper's internal `/proc` scans, signal broadcasts, and descendant waits. The web report is generated under `/tmp` and includes exact CTest output, test summaries, Docker integration output, a text rendition of the TUI flow, and the tuxreaperd zombie-reaping results. It requires `nc`, `netcat`, or Nmap's `ncat`; press `Ctrl-C` to stop the server. The default port is `8095`; pass a port after `--web-test-view` to override it. `--web-test-view --no-test` is invalid. Normal test runs include a Docker integration test using `debian:forky`, so Docker must be available. On systems with 1 GB or less of available memory, the script automatically uses a smaller build configuration and a single build job. @@ -125,7 +128,7 @@ ctest --test-dir build --output-on-failure ## About / Version -- Version: `0.3.1-beta` +- Version: `0.4-beta` - Created by: `markmental` - GitHub: https://github.com/MARKMENTAL/tuxdock - Forgejo: https://mentalnet.xyz/forgejo-v2/markmental/tuxdock diff --git a/main.cpp b/main.cpp index e465047..0629b70 100644 --- a/main.cpp +++ b/main.cpp @@ -717,7 +717,7 @@ void TuxDockApp::ActionExecDetachedCommand() { } void TuxDockApp::ActionAbout() { - OpenMessage("About Tux-Dock", "Tux-Dock 0.3.1-beta | Created by markmental"); + OpenMessage("About Tux-Dock", "Tux-Dock 0.4-beta | Created by markmental"); } void TuxDockApp::ExecuteSelectedAction() {