Message236481
A side effect of the changes made within are that getstatusoutput() on POSIX systems now returns a different value for status.
The old implementation present in Python 2 and Python 3.3 before this patch returned the raw waitpid() status result as the status value. ie: getstatusoutput("exit 1")[0] == 256. the lower 8 bits were reserved for the signal number the process died with, if any.
Now it returns the sanitized subprocess style returncode: positive numbers are the process exit code (so the above example returns 1) and negative numbers are the negative signal number the process died with.
I prefer the new behavior, but this API change is not documented anywhere that I can find. |
|
Date |
User |
Action |
Args |
2015-02-24 08:49:25 | gregory.p.smith | set | recipients:
+ gregory.p.smith, terry.reedy, ncoghlan, vstinner, tim.golden, ned.deily, eric.araujo, Arfrever, r.david.murray, brian.curtin, flox, jldm, python-dev, bpoaugust |
2015-02-24 08:49:25 | gregory.p.smith | set | messageid: <1424767765.3.0.499752786027.issue10197@psf.upfronthosting.co.za> |
2015-02-24 08:49:25 | gregory.p.smith | link | issue10197 messages |
2015-02-24 08:49:24 | gregory.p.smith | create | |
|