bpo-38778: Document that os.fork is not allowed in subinterpreters (G… · python/cpython@b220300

File tree

2 files changed

lines changed

  • Misc/NEWS.d/next/Documentation

2 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -3478,7 +3478,11 @@ written in Python, such as a mail server's external command delivery program.

34783478

parent. If an error occurs :exc:`OSError` is raised.

34793479
34803480

Note that some platforms including FreeBSD <= 6.3 and Cygwin have

3481-

known issues when using fork() from a thread.

3481+

known issues when using ``fork()`` from a thread.

3482+
3483+

.. versionchanged:: 3.8

3484+

Calling ``fork()`` in a subinterpreter is no longer supported

3485+

(:exc:`RuntimeError` is raised).

34823486
34833487

.. warning::

34843488

@@ -3495,6 +3499,10 @@ written in Python, such as a mail server's external command delivery program.

34953499

master end of the pseudo-terminal. For a more portable approach, use the

34963500

:mod:`pty` module. If an error occurs :exc:`OSError` is raised.

34973501
3502+

.. versionchanged:: 3.8

3503+

Calling ``forkpty()`` in a subinterpreter is no longer supported

3504+

(:exc:`RuntimeError` is raised).

3505+
34983506

.. availability:: some flavors of Unix.

34993507
35003508
Original file line numberDiff line numberDiff line change

@@ -0,0 +1 @@

1+

Document the fact that :exc:`RuntimeError` is raised if :meth:`os.fork` is called in a subinterpreter.