| commit | e69097596506139dfc1b9dd18baba9d52b1ac479 | [log] [tgz] |
|---|---|---|
| author | Chowder <16789070+chowder@users.noreply.github.com> | Wed Jul 10 03:39:40 2024 +0100 |
| committer | GitHub <noreply@github.com> | Wed Jul 10 02:39:40 2024 +0000 |
| tree | 01fa771bc92090b44f09e7cf66186deade712b8e | |
| parent | b024c5a7fe86abe7bdd58526c9aa5889db46762a [diff] |
fix: use `exec` to invoke the stage-2 bootstrap for non-zip case (#2047) When the two-stage bootstrap is used, the parent shell process runs python as a child process, which changes how signals are propagated. Specifically, if a signal is sent _directly_ to the parent (e.g. `kill $parent`), the child process (python) won't receive it and it will appear to be ignored. This is because the parent process is busy waiting for the child process. To fix, invoke the python process using `exec` instead. Because the process is entirely replaced, signals are sent directly to the replacement. This can't be used for zip files, though, because they rely on a catching the exit signal to perform cleanup of the extracted files. Fixes https://github.com/bazelbuild/rules_python/issues/2043 --------- Co-authored-by: Richard Levasseur <rlevasseur@google.com>
This repository is the home of the core Python rules -- py_library, py_binary, py_test, py_proto_library, and related symbols that provide the basis for Python support in Bazel. It also contains package installation rules for integrating with PyPI and other indices.
Documentation for rules_python is at https://rules-python.readthedocs.io and in the Bazel Build Encyclopedia.
Examples live in the examples directory.
The core rules are stable. Their implementation is subject to Bazel's backward compatibility policy. This repository aims to follow semantic versioning.
The Bazel community maintains this repository. Neither Google nor the Bazel team provides support for the code. However, this repository is part of the test suite used to vet new Bazel releases. See How to contribute page for information on our development workflow.
For detailed documentation, see https://rules-python.readthedocs.io
See Bzlmod support for more details.