Skip to content

Forward POSIX shutdown signals to supervised processes in JSON mode - #7558

Open
harsh21234i wants to merge 9 commits into
reflex-dev:mainfrom
harsh21234i:fix/7509-json-run-sigint
Open

harsh21234i wants to merge 9 commits into
reflex-dev:mainfrom
harsh21234i:fix/7509-json-run-sigint

Conversation

@harsh21234i

@harsh21234i harsh21234i commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

When reflex run --json supervises a child process, a SIGINT sent to the supervisor PID can interrupt the supervisor without stopping the child. Forward SIGINT to the running child on POSIX so process supervisors configured with stopsignal=INT can stop Reflex cleanly.

Closes #7509.

Testing

  • uv run pytest tests/units/reflex_base/utils/test_log.py -q — 80 passed, 2 skipped on Windows.
  • Linux PID-targeted SIGINT regression test — 1 passed.
  • Applicable pre-commit hooks — passed.

View guided diff

@harsh21234i
harsh21234i requested a review from a team as a code owner October 14, 2026 10:01

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread packages/reflex-base/src/reflex_base/utils/log.py Outdated
Comment thread news/+7509-forward-sigint-to-supervised-process.bugfix.md Outdated
Comment thread news/+7509-forward-sigint-to-supervised-process.bugfix.md Outdated
@greptile-apps

greptile-apps Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[High impact] The PR appears safe to merge; the previous terminal quit issue is fixed.

Summary

On POSIX, reflex run --json forwards shutdown signals to the child's process group and waits for the child.

  • JSON mode forwards POSIX shutdown signals to the supervised app.

Reviews (6) · Last reviewed commit: "fix: forward SIGQUIT to supervised proce..." · Reviewed by Greptile

Comment thread news/+7509-forward-sigint-to-supervised-process.bugfix.md Outdated
Comment thread tests/units/reflex_base/utils/test_log.py
@codspeed

codspeed Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ 10 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

✅ 148 untouched benchmarks


Comparing harsh21234i:fix/7509-json-run-sigint (b78bd1a) with main (7ccaa4e)

Open in CodSpeed

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 4 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread packages/reflex-base/src/reflex_base/utils/log.py Outdated
Comment thread packages/reflex-base/src/reflex_base/utils/log.py Outdated
@harsh21234i harsh21234i changed the title Fix/7509 json run sigint Forward POSIX shutdown signals to supervised processes in JSON mode Oct 14, 2026
Comment thread packages/reflex-base/src/reflex_base/utils/log.py
@masenf masenf added the bug Something isn't working label Oct 19, 2026 — with ChatGPT Codex Connector

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reflex run --json ignores SIGINT sent to its pid; under supervisord stopsignal=INT the app is orphaned and blocks the restart

2 participants