A headless server stopped with SIGTERM dies with exit 143 and no stats or stop log line, because Godot 4.7.2 doesn't pass the signal to scripts. The _exit_tree fallback in HeadlessServer never runs. Found while finishing F6 (#6).
Acceptance
Stopping a server with SIGTERM or SIGINT writes the stats and stop lines and exits 0. A launcher that traps the signal and asks the server to quit (for example through a local control channel once networking exists) is acceptable.
Tested in tools/smoke.sh.
**Depends on:** F6
A headless server stopped with SIGTERM dies with exit 143 and no `stats` or `stop` log line, because Godot 4.7.2 doesn't pass the signal to scripts. The `_exit_tree` fallback in `HeadlessServer` never runs. Found while finishing F6 (#6).
**Acceptance**
- Stopping a server with SIGTERM or SIGINT writes the `stats` and `stop` lines and exits 0. A launcher that traps the signal and asks the server to quit (for example through a local control channel once networking exists) is acceptable.
- Tested in `tools/smoke.sh`.
claude
added this to the v0.9 Hardening milestone 2026-11-10 01:08:07 +00:00
Deferred for the Monday 2026-11-16 build, because it is low priority and the schedule is more than a day behind. N7's packaging needs graceful shutdown, so N7 covers SIGTERM, and this closes with it if that's enough. — tidewall-build
Deferred for the Monday 2026-11-16 build, because it is low priority and the schedule is more than a day behind. N7's packaging needs graceful shutdown, so N7 covers SIGTERM, and this closes with it if that's enough. — tidewall-build
The engine still can't catch SIGTERM, so the packaged wrapper packaging/server/tidewall-server traps SIGTERM and SIGINT and creates the server's --stop-file. The server checks for that file four times a second, then stops cleanly: it tells everyone connected it shut down, writes stats and stop, and exits 0. If the server hasn't gone after 15 s, the wrapper kills it. A stale stop file left over from an earlier run is removed when the server starts.
tools/smoke.sh, which make check runs, now starts a server through the wrapper, sends it SIGTERM, and checks for exit 0, a stats line and a clean stop line. make server-package-check checks the same thing through docker compose stop.
A server run directly (tools/godot.sh -- --server) still dies on SIGTERM without those lines. That is the engine's behaviour, and anything that runs a server should go through the wrapper.
— tidewall-build
Done with N7 (8eb6e58), plus a smoke test (0797b11).
The engine still can't catch SIGTERM, so the packaged wrapper `packaging/server/tidewall-server` traps SIGTERM and SIGINT and creates the server's `--stop-file`. The server checks for that file four times a second, then stops cleanly: it tells everyone connected it shut down, writes `stats` and `stop`, and exits 0. If the server hasn't gone after 15 s, the wrapper kills it. A stale stop file left over from an earlier run is removed when the server starts.
`tools/smoke.sh`, which `make check` runs, now starts a server through the wrapper, sends it SIGTERM, and checks for exit 0, a `stats` line and a clean `stop` line. `make server-package-check` checks the same thing through `docker compose stop`.
A server run directly (`tools/godot.sh -- --server`) still dies on SIGTERM without those lines. That is the engine's behaviour, and anything that runs a server should go through the wrapper.
— tidewall-build
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Depends on: F6
A headless server stopped with SIGTERM dies with exit 143 and no
statsorstoplog line, because Godot 4.7.2 doesn't pass the signal to scripts. The_exit_treefallback inHeadlessServernever runs. Found while finishing F6 (#6).Acceptance
statsandstoplines and exits 0. A launcher that traps the signal and asks the server to quit (for example through a local control channel once networking exists) is acceptable.tools/smoke.sh.Deferred for the Monday 2026-11-16 build, because it is low priority and the schedule is more than a day behind. N7's packaging needs graceful shutdown, so N7 covers SIGTERM, and this closes with it if that's enough. — tidewall-build
Done with N7 (
8eb6e58), plus a smoke test (0797b11).The engine still can't catch SIGTERM, so the packaged wrapper
packaging/server/tidewall-servertraps SIGTERM and SIGINT and creates the server's--stop-file. The server checks for that file four times a second, then stops cleanly: it tells everyone connected it shut down, writesstatsandstop, and exits 0. If the server hasn't gone after 15 s, the wrapper kills it. A stale stop file left over from an earlier run is removed when the server starts.tools/smoke.sh, whichmake checkruns, now starts a server through the wrapper, sends it SIGTERM, and checks for exit 0, astatsline and a cleanstopline.make server-package-checkchecks the same thing throughdocker compose stop.A server run directly (
tools/godot.sh -- --server) still dies on SIGTERM without those lines. That is the engine's behaviour, and anything that runs a server should go through the wrapper.— tidewall-build