fix(shim): write exit_file when main() returns Error (exit code 1)#232
Merged
DorianZheng merged 1 commit intoboxlite-ai:mainfrom Feb 12, 2026
Merged
fix(shim): write exit_file when main() returns Error (exit code 1)#232DorianZheng merged 1 commit intoboxlite-ai:mainfrom
DorianZheng merged 1 commit intoboxlite-ai:mainfrom
Conversation
Previously, exit_file was only written on panic (exit code 101) or signal (exit code 128+N), but not when main() returned a normal Result::Err with exit code 1. This meant the main process couldn't get detailed error information when the shim exited normally with an error. Changes: - Add ExitInfo::Error variant for normal error returns (exit code 1) - Update CrashReport to handle Error type with user-friendly message - Refactor shim/main() to capture run_shim() errors and write exit_file - main() now writes exit_file before returning Err(e) Now all three exit paths write exit_file: - Panic (exit code 101) → ExitInfo::Panic - Signal (exit code 128+N) → ExitInfo::Signal - Normal error (exit code 1) → ExitInfo::Error (when main returns Err) Signed-off-by: Wenyu Huang <[email protected]>
Contributor
Author
|
Old msg: New msg: |
DorianZheng
approved these changes
Feb 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request (#227) is excellent, providing very user-friendly error messages, but it didn't handle the situation where the shim process exits with error code 1. This pull request addresses this issue.
Changes:
Now all three exit paths write exit_file: