]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40094: Add os.waitstatus_to_exitcode() (GH-19201)
authorVictor Stinner <vstinner@python.org>
Wed, 1 Apr 2020 16:49:29 +0000 (18:49 +0200)
committerGitHub <noreply@github.com>
Wed, 1 Apr 2020 16:49:29 +0000 (18:49 +0200)
commit65a796e5272f61b42792d3a8c69686558c1872c5
tree138d64a8dd04ab4d1cac2eb5c415aa10e0bbe00f
parent5dd836030e0e399b21ab0865ae0d93934bdb3930
bpo-40094: Add os.waitstatus_to_exitcode() (GH-19201)

Add os.waitstatus_to_exitcode() function to convert a wait status to an
exitcode.

Suggest waitstatus_to_exitcode() usage in the documentation when
appropriate.

Use waitstatus_to_exitcode() in:

* multiprocessing, os, subprocess and _bootsubprocess modules;
* test.support.wait_process();
* setup.py: run_command();
* and many tests.
18 files changed:
Doc/library/os.rst
Doc/library/pty.rst
Doc/whatsnew/3.9.rst
Lib/_bootsubprocess.py
Lib/multiprocessing/forkserver.py
Lib/multiprocessing/popen_fork.py
Lib/os.py
Lib/subprocess.py
Lib/test/support/__init__.py
Lib/test/test_os.py
Lib/test/test_popen.py
Lib/test/test_pty.py
Lib/test/test_wait3.py
Lib/test/test_wait4.py
Misc/NEWS.d/next/Library/2020-03-28-18-25-49.bpo-40094.v-wQIU.rst [new file with mode: 0644]
Modules/clinic/posixmodule.c.h
Modules/posixmodule.c
setup.py