Martin Panter added the comment:
Here is a patch:
* Use different return value variable names and point out that they are encoded
differently
* Add another bullet point about signal handling
* Fix os.system() documentation of the return value. My understanding is it is
the C standard that
New submission from Andreas Sommer:
Reading over the section Replacing os.system()
(https://docs.python.org/2/library/subprocess.html#replacing-os-system), one
might assume that the return value of os.system and subprocess.call are
equivalent.
status = os.system(mycmd + myarg)
#
Martin Panter added the comment:
Another difference is that (at least POSIX) system() blocks SIGINT and SIGQUIT
while the child is running. Compare:
$ python3 -c 'print(Waiting); import os; print(Returned, os.system(sleep 3
exit 3))'
Sleeping
Returned 768
$ python3 -c 'print(Sleeping);