fix(mesh/reticulum): kill the whole daemon process group on drop

The reticulum daemon is a PyInstaller one-file binary: a bootloader parent
that forks the real Python process. `kill_on_drop`/`start_kill()` only SIGKILL
the bootloader, orphaning the forked child — which keeps holding the RNode
serial port. Across the listener's 30-min RX-stall reconnects this piled up
(observed 9 concurrent instances on a live node) all clutching /dev/ttyUSB0,
garbling the RNode so it stopped transmitting entirely.

Spawn the daemon as its own process-group leader (`process_group(0)`) and, on
drop, signal the whole group (SIGTERM for a clean RNode/socket release, then
SIGKILL as a hard backstop) so the forked child can never be orphaned.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-07-01 21:29:54 +01:00
co-authored by Claude Opus 4.8
parent 81444ab4a8
commit be50c886bb
3 changed files with 22 additions and 3 deletions
+1
View File
@@ -128,6 +128,7 @@ dependencies = [
"hyper-ws-listener",
"iroh",
"iroh-blobs",
"libc",
"mainline",
"mdns-sd",
"nostr-sdk",