Add tuxreaperd micro-init and in-container zombie-reaping tests for 0.2
Some checks failed
Build & Upload tux-dock / build (push) Has been cancelled

This commit is contained in:
mrkmntal 2026-08-26 17:59:39 -04:00
commit d31ab6af07
9 changed files with 343 additions and 6 deletions

View file

@ -1,5 +1,22 @@
# Tux-Dock Development Log
## 0.2-beta
This release introduces `tuxreaperd`, a micro init system for containers.
### Micro init
- Added `tuxreaperd.c`, a small C daemon used as PID 1 inside containers created by tux-dock.
- Runs as a subreaper (`PR_SET_CHILD_SUBREAPER`) with a SIGCHLD handler that reaps every reparented/terminated descendant, so orphaned processes never accumulate as zombies.
- Forwards SIGTERM/SIGINT/SIGHUP to the primary workload and propagates its exit status (128 + signal for signal deaths).
- `compile.sh` statically builds it (`gcc -O2 -static -Wall -Wextra tuxreaperd.c -o build/tuxreaperd`) alongside the rest of the tree.
- `DockerManager::createContainer` bind-mounts `tuxreaperd` into the container as PID 1 and resolves the binary next to the `tux-dock` executable when it is not in the current directory.
### Tests
- Added `tuxreaperd-zombie-tests`, an in-container test suite that boots a container with `tuxreaperd` as PID 1 and verifies orphaned grandchildren are reaped (zero zombies), exit status is propagated, and `docker stop` cleanly shuts down via forwarded SIGTERM (exit 143).
- The HTML web test view now includes a "Tuxreaperd Zombie Reaping" section alongside the Docker integration and TUI transcript sections.
## 0.1.2-beta
This release adds signal trapping to prevent state corruption during long-running Docker operations.