Closed ghamerly closed 5 years ago
The return values of os.system
and subprocess.call
are different -- os.system returns a C exit code which should be checked by os.WIFEXITED
etc., while subprocess.call returns either a non-negative number to indicate a normal exit with that return code, or a negative value to indicate a signal.
The return values of
os.system
andsubprocess.call
are different -- os.system returns a C exit code which should be checked byos.WIFEXITED
etc., while subprocess.call returns either a non-negative number to indicate a normal exit with that return code, or a negative value to indicate a signal.
I was worried about that, but could not find good documentation on it quickly (e.g. this link seems not to point out the differences clearly, even though it should: https://docs.python.org/2/library/subprocess.html#replacing-os-system). I'll make some updates.
@ghamerly looks fine to me, can we merge?
@ghamerly looks fine to me, can we merge?
Yes, sorry for the slow response. Just rebased for the merge.
Two commits -- for two different issues
First commit fixes #126 Second commit fixes #125 in a generic way