diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2023-12-14 19:14:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-14 19:14:50 (GMT) |
commit | 22511f77c2818a138a252e6ddae89725d082f8b0 (patch) | |
tree | 7690588c6ca1a90a5a765f7ddc5b08ed4332c9d7 /Doc/library/os.rst | |
parent | a723a13bf135306cdc5999a959596bfb487e8f4f (diff) | |
download | cpython-22511f77c2818a138a252e6ddae89725d082f8b0.zip cpython-22511f77c2818a138a252e6ddae89725d082f8b0.tar.gz cpython-22511f77c2818a138a252e6ddae89725d082f8b0.tar.bz2 |
gh-105912: document gotcha with using os.fork on macOS (#112871)
* gh-105912: document gotcha with using os.fork on macOS
Using ``fork(2)`` on macOS when also using higher-level
system APIs in the parent proces can crash on macOS because
those system APIs are not written to handle this usage
pattern.
There's nothing we can do about this other than documenting
the problem.
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r-- | Doc/library/os.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index f4566a6..2ff0b73 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -4383,6 +4383,11 @@ written in Python, such as a mail server's external command delivery program. If you use TLS sockets in an application calling ``fork()``, see the warning in the :mod:`ssl` documentation. + .. warning:: + + On macOS the use of this function is unsafe when mixed with using + higher-level system APIs, and that includes using :mod:`urllib.request`. + .. versionchanged:: 3.8 Calling ``fork()`` in a subinterpreter is no longer supported (:exc:`RuntimeError` is raised). @@ -4422,6 +4427,11 @@ written in Python, such as a mail server's external command delivery program. .. audit-event:: os.forkpty "" os.forkpty + .. warning:: + + On macOS the use of this function is unsafe when mixed with using + higher-level system APIs, and that includes using :mod:`urllib.request`. + .. versionchanged:: 3.12 If Python is able to detect that your process has multiple threads, this now raises a :exc:`DeprecationWarning`. See the |