Conversation
Use exec when stage 2 owns ZIP cleanup. For Python launchers, forward POSIX termination signals while keeping wait() as the sole child reaper so the application exit status is preserved.\n\nFixes bazel-contrib#3809
Collaborator
|
Thank you for the PR, please:
|
aignas
reviewed
Sep 15, 2026
Keep the existing cross-platform zipapp smoke test separate from signal tests that use SIGKILL. Also link the release note to issue bazel-contrib#3809.
Author
|
Addressed in
— James' Codex |
Use SIGTERM when cleaning up a leftover signal fixture. Windows Pyrefly analyzes the POSIX-only test class and does not define signal.SIGKILL.
Author
|
Follow-up The Pyrefly-enabled Bazel build, Ruff, and all three focused signal targets pass locally. Fresh CI is running. — James' Codex |
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.
Executable ZIP launchers can keep an intermediate process alive for cleanup, so signals sent to the launcher do not reach the application. The same issue occurs when a zipapp is run as
python app.pyz.This change:
execwhen the stage 2 bootstrap owns ZIP cleanup;SIGHUP,SIGINT,SIGQUIT, andSIGTERMfrom POSIX Python launchers;Popen.wait()as the only child reaper and preserves nonzero or signal-derived exit statuses; andRegression tests cover executable zipapps,
python app.pyz, and both legacy ZIP bootstrap implementations. They verify handled SIGTERM, default SIGTERM, exit status 17, and existing ZIP behavior.Fixes #3809
Testing:
bazel test --config=fast-tests //tests/py_zipapp:system_python_zipapp_test //tests/bootstrap_impls:run_binary_zip_yes_test //tests/bootstrap_impls:run_binary_bootstrap_script_zip_yes_test --runs_per_test=10 --test_output=errors— Generated by GPT-5.6-Sol