[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True
Berwyn added the comment: I agree with the patch, and it works fine: /bin/sh -c "gcc --version" gcc --version But I begin to wonder whether bash has a bug since bash only seems to observe the string, not the parameters after it. For example: $ bash -c "./printargs.py abc" def ghi jkl produces: ['./printargs.py', 'abc'] where printargs.py is: #!/usr/bin/python import sys print sys.argv Just something to be aware of. -- nosy: +berwyn ___ Python tracker <http://bugs.python.org/issue6689> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True
Berwyn added the comment: I think this should be documented more clearly rather than just rejected. It keeps causing various people grief. David Fraser's post would be good documentation. -- status: pending -> open ___ Python tracker <http://bugs.python.org/issue6689> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True
Berwyn added the comment: Good point, Stefan. In hindsight my issue was probably more with understanding how the sh command line works rather than how python works. -- status: pending -> open ___ Python tracker <http://bugs.python.org/issue6689> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True
Berwyn added the comment: Ah. I don't need to feel so forgetful, then. -- title: subprocess doesn't pass arguments correctly on Linux when shell=True -> subprocess doesn't pass arguments correctly on Linux whenshell=True ___ Python tracker <http://bugs.python.org/issue6689> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com