fix(summer): forward SIGINT and SIGTERM to the app binary

- runAppBinary registers SIGINT and SIGTERM after its build and recursion
  checks and runChild forwards each signal to the app binary, then waits
  for it to exit, so stopping summer serve frees the port (WR-08)
- newAppCmd keeps the inherited stdin, env and output, and a context
  cancel sends SIGTERM with a 15-second appShutdownGrace before SIGKILL
- the child stays in summer's process group so the admin password
  prompts can read the terminal
- helper-process tests cover SIGINT, SIGTERM and context cancel
- console introduction notes the signal forwarding
This commit is contained in:
Jakub Zych
2026-10-08 16:12:01 +02:00
parent b9ef034272
commit 50c8cee541
3 changed files with 187 additions and 4 deletions

View File

@@ -57,6 +57,8 @@ summer admin:create --email admin@example.com --superuser
One leading `--` is ignored, so `summer serve -- --addr 127.0.0.1:8123` behaves the same as `summer serve --addr 127.0.0.1:8123`.
When `summer` receives SIGINT or SIGTERM while the binary runs, it passes the signal on and waits for the binary to shut down, so stopping `summer serve` with Ctrl+C or `kill` frees its port.
`summer` does not rebuild an existing binary before it delegates. Run `summer build` after you change code, or keep `summer dev` running. Every other runtime command, such as `deferred:purge` or the commands your plugins add, is run on the binary directly.
## The sections of this chapter