This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年02月24日 08:56 by gregory.p.smith, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg236482 - (view) | Author: Gregory P. Smith (gregory.p.smith) * (Python committer) | Date: 2015年02月24日 08:56 | |
The changes from http://bugs.python.org/issue10197 caused subprocess.getstatusoutput() to start returning a subprocess returncode style status for the child process instead of a POSIX style status. before that bug's changes: >>> getstatusoutput("exit 1")[0] 256 >>> getstatusoutput("kill -TERM $$")[0] 15 after that bug's changes: >>> getstatusoutput("exit 1")[0] 1 >>> getstatusoutput("kill -TERM $$")[0] -15 This behavior was entirely untested so it was missed when fixing issue10197. Given the new behavior has shipped in a stable Python release starting with (I believe) 3.3.4 and all 3.4 releases I do not think it should be changed. But we should document it with proper versionchanged notices. |
|||
| msg236532 - (view) | Author: Gregory P. Smith (gregory.p.smith) * (Python committer) | Date: 2015年02月24日 19:30 | |
Workaround: To determine the behavior of the interpreter your POSIX program is running under rather than a hard coded patch level version check, write appropriate conditional code to perform a test such as:
_returns_new_status = subprocess.getstatusoutput('kill $$')[0] < 0
|
|||
| msg302219 - (view) | Author: Gregory P. Smith (gregory.p.smith) * (Python committer) | Date: 2017年09月14日 22:01 | |
documentation updates as part of issue22635. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:13 | admin | set | github: 67696 |
| 2017年09月14日 22:01:32 | gregory.p.smith | set | status: open -> closed type: behavior superseder: subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) assignee: gregory.p.smith components: + Documentation versions: + Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 messages: + msg302219 resolution: fixed stage: resolved |
| 2015年02月25日 10:04:46 | Arfrever | set | nosy:
+ Arfrever |
| 2015年02月24日 19:30:51 | gregory.p.smith | set | messages: + msg236532 |
| 2015年02月24日 08:56:18 | gregory.p.smith | create | |