bpo-16500: Don't use string constants for os.register_at_fork() behavior (#1834)

Instead use keyword only arguments to os.register_at_fork for each of the scenarios.
Updates the documentation for clarity.
This commit is contained in:
Gregory P. Smith 2017-05-29 10:03:41 -07:00 committed by GitHub
parent eba68e2c42
commit 163468a766
8 changed files with 128 additions and 75 deletions

View file

@ -49,9 +49,10 @@ Operating System Utilities
.. c:function:: void PyOS_AfterFork_Child()
Function to update some internal state after a process fork. This
should be called from the child process after calling :c:func:`fork`
or any similar function that clones the current process.
Function to update internal interpreter state after a process fork.
This must be called from the child process after calling :c:func:`fork`,
or any similar function that clones the current process, if there is
any chance the process will call back into the Python interpreter.
Only available on systems where :c:func:`fork` is defined.
.. versionadded:: 3.7