Skip to content

Pass signaled exit code properly to the client #741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

zygzagZ
Copy link

@zygzagZ zygzagZ commented Jun 20, 2025

Pass signaled exit code properly to the client

Process::Status#existstatus is nil when child did not exit cleanly. When ruby process crashes, running it with spring masked exit code and returned 0.
This commit allows Spring::Server thread to properly pass application exit code to the client, even when signaled or stopped.

Fixes #676.

zygzagZ added 4 commits June 20, 2025 15:14
Process::Status#existstatus is nil when child did not exit cleanly. When ruby process crashes, running it with spring masked exit code and returned 0.
This commit allows Spring::Server thread to properly pass application exit code to child, even when signaled or stopped.

Fixes rails#676.
In the previous commit I fixed a scenario where Spring Server failed to pass the application exit code through to Spring Client. Should similar thing happen in future, this can also be detected in Spring Client. It should expect to read some integer and not default to 0 when read nil.

This commit introduces such assertion in Spring Client.

Also fixes rails#676.

@see 3a8e609
UNIX adds 128 to signal codes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Different exit code for SIGKILL'ed processes with Spring
1 participant