diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-06-04 04:32:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-04 04:32:00 (GMT) |
commit | c7a9d96a25a646d37cb97506019e82ee7493d1b3 (patch) | |
tree | 28c1706b85c96d3b04e4a3ed56378acec7cee217 /Python/compile.c | |
parent | f629d5fc240e674652e6d183ada7a4e2dbdf3e18 (diff) | |
download | cpython-c7a9d96a25a646d37cb97506019e82ee7493d1b3.zip cpython-c7a9d96a25a646d37cb97506019e82ee7493d1b3.tar.gz cpython-c7a9d96a25a646d37cb97506019e82ee7493d1b3.tar.bz2 |
[3.12] gh-104690 Disallow thread creation and fork at interpreter finalization (GH-104826) (#105277)
gh-104690 Disallow thread creation and fork at interpreter finalization (GH-104826)
Disallow thread creation and fork at interpreter finalization.
in the following functions, check if interpreter is finalizing and raise `RuntimeError` with appropriate message:
* `_thread.start_new_thread` and thus `threading`
* `posix.fork`
* `posix.fork1`
* `posix.forkpty`
* `_posixsubprocess.fork_exec` when a `preexec_fn=` is supplied.
---------
(cherry picked from commit ce558e69d4087dd3653207de78345fbb8a2c7835)
Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Diffstat (limited to 'Python/compile.c')
0 files changed, 0 insertions, 0 deletions