Handle intentional Granian SIGTERM shutdown

Closed
HA
10d ago
+81-0

Closes #7266 by avoiding a misleading “Unexpected exit” error when Reflex and its Granian worker receive SIGTERM together.

The worker watcher treats SIGTERM as intentional only after Granian's supervisor has received its own interrupt signal. Worker-only SIGTERM exits retain Granian's normal failure handling and release the listener when no workers remain.

Testing

  • tests/units/utils/test_exec.py: 33 passed, 3 skipped
  • git diff --check passed