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:
co-authored by
Claude Opus 4.8
parent
81444ab4a8
commit
be50c886bb
@@ -22,6 +22,7 @@ iroh-swarm = ["dep:iroh", "dep:iroh-blobs"]
|
||||
[dependencies]
|
||||
# Core dependencies
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
libc = "0.2" # process-group signalling for the supervised reticulum daemon
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
anyhow = "1.0"
|
||||
|
||||
Reference in New Issue
Block a user