Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 4, 2023

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Jun 4, 2023

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 [email protected]
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith [email protected]


📚 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 <[email protected]>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <[email protected]>
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