← 返回首页
[3.12] gh-104690 Disallow thread creation and fork at interpreter finalization (GH-104826) by miss-islington · Pull Request #105277 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

[3.12] gh-104690 Disallow thread creation and fork at interpreter finalization (GH-104826)#105277

Merged
gpshead merged 1 commit into
python:3.12from
miss-islington:backport-ce558e6-3.12
Jun 4, 2023
Merged

[3.12] gh-104690 Disallow thread creation and fork at interpreter finalization (GH-104826)#105277
gpshead merged 1 commit into
python:3.12from
miss-islington:backport-ce558e6-3.12

Conversation

miss-islington commented Jun 4, 2023
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Contributor

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 ce558e6)

Co-authored-by: chgnrdv 52372310+chgnrdv@users.noreply.github.com
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith greg@krypto.org

📚 Documentation preview 📚: https://cpython-previews--105277.org.readthedocs.build/

…lization (pythonGH-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 ce558e6) Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Footer

© 2026 GitHub, Inc.