diff Lib/subprocess.py @ 63094:aa0b56dd14af

Issue #9265: Incorrect name passed as arg[0] when shell=True and executable specified.
author Stefan Krah <stefan@bytereef.org>
date Mon, 19 Jul 2010 14:20:53 +0000
parents ef8a2ab26e9f
children e41ca6672f82
line wrap: on
line diff
--- a/Lib/subprocess.py	Mon Jul 19 13:00:36 2010 +0000
+++ b/Lib/subprocess.py	Mon Jul 19 14:20:53 2010 +0000
@@ -1073,6 +1073,8 @@
 
             if shell:
                 args = ["/bin/sh", "-c"] + args
+                if executable:
+                    args[0] = executable
 
             if executable is None:
                 executable = args[0]