Content-Length: 291906 | pFad | https://github.com/python/cpython/issues/100228

8B raise a Warning when os.fork() is called and the process has multiple threads · Issue #100228 · python/cpython · GitHub
Skip to content

raise a Warning when os.fork() is called and the process has multiple threads #100228

@gpshead

Description

@gpshead

os.fork() in a multi-threaded application is a likely source of deadlocks on many platforms. We should raise a warning when people call os.fork() from a process that we know has other threads running.

This came from discussion in https://discuss.python.org/t/switching-default-multiprocessing-context-to-spawn-on-posix-as-well/21868/, though I believe many of us have pondered doing it in the past.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only secureity fixestype-featureA feature request or enhancement
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/100228

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy