GNOME Bugzilla – Bug 761982
Double shell in subprocess.Popen() causes crashes
Last modified: 2016-02-16 21:20:31 UTC
utils.get_libtool_command() already prepends a shell (there is an explicit comment there on this topic). resolve_windows_libs() prepends another one. Passing the shell twice results in an error on Linux (I think the first one tries to parse the second one as a script): >>> import subprocess >>> subprocess.Popen(['/bin/sh', '/bin/sh']) /bin/sh: /bin/sh: cannot execute binary file Why this never popped up before? My guess is on Windows subprocess.Popen or "sh.exe" work differently so this issue is only relevant when cross-compiling for Windows from a UNIX OS... in other words it never happened before.
Created attachment 321060 [details] [review] Proposed solution
Created attachment 321063 [details] [review] Remove leading shell *only* while cross-compiling This is a less invasive solution that leaves `sh.exe` in place when compiling on windows, so it should not have drawbacks.
Review of attachment 321063 [details] [review]: Ok.