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.

Author jweese
Recipients jweese, nik-sm
Date 2020-02-20.15:39:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582213190.21.0.249466271694.issue39692@roundup.psfhosted.org>
In-reply-to
Content
I believe this behavior is expected (at least in posix-land).

Lib/subprocess.py L1702 shows that whenever shell=True, the args that are constructed are [unix_shell, "-c"] + args.

And so we can reproduce your behavior just using a regular shell. (This is Darwin but with a recent bash from homebrew):

$ bash -c 'exit 1'  # like subprocess string case
$ echo $?
1
$ bash -c exit 1  # like subprocess list case (note args are separated)
$ echo $?
0
History
Date User Action Args
2020-02-20 15:39:50jweesesetrecipients: + jweese, nik-sm
2020-02-20 15:39:50jweesesetmessageid: <1582213190.21.0.249466271694.issue39692@roundup.psfhosted.org>
2020-02-20 15:39:50jweeselinkissue39692 messages
2020-02-20 15:39:49jweesecreate