Jonny Weese <jwe...@gmail.com> added the comment:
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 ---------- nosy: +jweese _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39692> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com