Commit Graph

3 Commits

Author SHA1 Message Date
Victor Stinner 65a796e527
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.
2020-04-01 18:49:29 +02:00
Victor Stinner 40bfdb1594
bpo-40094: Add _bootsubprocess._waitstatus_to_exitcode (GH-19264)
* Add _waitstatus_to_exitcode() helper function to _bootsubprocess.
* Enhance check_output() error message if the command fails.

_bootsubprocess no longer handles WIFSTOPPED() case: it now raises a
ValueError.
2020-03-31 23:45:13 +02:00
Victor Stinner addaaaa946
bpo-39763: Add _bootsubprocess to build Python on AIX (GH-18872)
Add _bootsubprocess module to bootstrap Python: subprocess
implementation which only uses the os module.

On AIX, distutils.util uses _aix_support which calls
subprocess.check_output(), before the _posixsubprocess module is
built. Implement check_output() with os.system() in _bootsubprocess.
2020-03-09 23:45:59 +01:00