[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified
R. David Murray
report at bugs.python.org
Thu Jul 15 18:51:41 CEST 2010
R. David Murray <rdmurray at bitdance.com> added the comment:
Ah, I misread the test the first time.
Well, I'd prefer a test that always did a real test on posix, but I suppose this has to be good enough since there could be systems that Python otherwise supports that *only* have /bin/sh. Actually I suppose one could create a local symlink to /bin/sh and call through that...but I don't think this issue warrants going to any more effort, so I think the patch is fine as is.
You could argue that /bin/sh is good to have in the list since it makes sure that arg[0] doesn't get changed inappropriately in the default case. I'd be more comfortable if the test generated a skip message if the only one of the shells that is found is /bin/sh, but I'm not going to insist on it. (This will be true, for example, on FreeBSD (at least on 6, which is the install I can easily check...maybe you could add /usr/local/bin/bash as one of your candidates? Most FreeBSDs will end up having that one installed, though not of course all of them).
I vote we don't worry about the csh only case :)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9265>
_______________________________________
More information about the Python-bugs-list
mailing list