diff -r 8bb426d386a5 Doc/library/subprocess.rst --- a/Doc/library/subprocess.rst Wed Oct 12 20:18:33 2016 +0200 +++ b/Doc/library/subprocess.rst Thu Oct 13 13:35:38 2016 +0200 @@ -1175,14 +1175,16 @@ >>> subprocess.getstatusoutput('ls /bin/ls') (0, '/bin/ls') >>> subprocess.getstatusoutput('cat /bin/junk') - (256, 'cat: /bin/junk: No such file or directory') + (1, 'cat: /bin/junk: No such file or directory') >>> subprocess.getstatusoutput('/bin/junk') - (256, 'sh: /bin/junk: not found') + (127, 'sh: /bin/junk: not found') Availability: POSIX & Windows .. versionchanged:: 3.3.4 Windows support added + Pay attention the behavior has changed before the return code was always 256. + Now the return code matches the exit value of subprocess. .. function:: getoutput(cmd)