mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
The previous trap only fired on the EXIT pseudo-signal, which doesn't always run cleanly when the script is killed mid-flight — leaving the nohup'd wnd daemons (and the local relay) alive and still holding the port. Route SIGINT/SIGTERM/SIGHUP through an explicit `exit`, use a single idempotent cleanup handler, and preserve the exit code so the harness still reports failure when killed.