Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mingw: avoid spawning processes with a \\?\-prefixed executable
The thing is: Executables on Windows may inspect their own path via _pgmptr (see https://msdn.microsoft.com/en-us/library/tza1y5f7.aspx) e.g. to figure out the location of related files. Git, for example, needs to figure out where the libexec/git-core/ directory is with its supporting Unix shell and Perl scripts (and for well-intentioned backwards-compatibility, even dashed forms of the builtins). These programs, however, may very well be unaware that they were possibly called with the \\?\ prefix, and as a consequence, they may very well be unable to handle it. One prominent example is MSYS2's gdb (MINGW version). The symptom is: $ C:/msys64/mingw64/bin/gdb.exe --help Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] ImportError: No module named site Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
- Loading branch information