[issue9265] Can't choose other shell in subprocess

Stefan Krah report at bugs.python.org
Thu Jul 15 15:16:10 CEST 2010


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

Isn't just the name of the executable wrong? /bin/bash is
executed all right, but the name is set to "/bin/sh".



Index: Lib/subprocess.py
===================================================================
--- Lib/subprocess.py   (revision 82816)
+++ Lib/subprocess.py   (working copy)
@@ -1091,6 +1091,8 @@
 
             if shell:
                 args = ["/bin/sh", "-c"] + args
+                if executable:
+                    args[0] = executable



In general though, I'd prefer to specify another shell by shell="bin/bash".

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9265>
_______________________________________


More information about the Python-bugs-list mailing list