mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
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.
This commit is contained in:
parent
5dd836030e
commit
65a796e527
18 changed files with 258 additions and 61 deletions
3
setup.py
3
setup.py
|
@ -9,7 +9,6 @@ import re
|
|||
import sys
|
||||
import sysconfig
|
||||
from glob import glob
|
||||
from _bootsubprocess import _waitstatus_to_exitcode as waitstatus_to_exitcode
|
||||
|
||||
|
||||
try:
|
||||
|
@ -98,7 +97,7 @@ Topic :: Software Development
|
|||
|
||||
def run_command(cmd):
|
||||
status = os.system(cmd)
|
||||
return waitstatus_to_exitcode(status)
|
||||
return os.waitstatus_to_exitcode(status)
|
||||
|
||||
|
||||
# Set common compiler and linker flags derived from the Makefile,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue