-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Git for Windows Bash(not git): Start a process when its path is a symbolic link, the Argv0 of the process is incorrect #2161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@PhilipOakley This is not the same problem. It is actually not related to git, but to the MSYS2 Bash environment that Git for Windows carries. This issue has been fixed in the official release of MSYS2, and it still exists in Git for Windows Bash. The essence of this problem is that when the started process path is a symbolic link, it is incorrectly changed to start directly from the target path of the symbolic link, causing Argv0 to be different from expected, and on Windows systems, it may also cause dll loading path. Not in line with expectations. |
@dscho This issue is related to Cygwin (msys2-runtime) or Bash. |
Have a look into the build-extra repo which contains all the bash and other support items to see if this has already been fixed ready for the next release. It is normal that dscho will pick up the pacman supported changes automagically, but unless there is a significant breakage the changes don't appear until the next Git release. (see #2162 for an example of something being easily missed) |
Or test the current snapshot. |
@fcharlie the snapshots are at https://wingit.blob.core.windows.net/files/index.html to look at the builds of other branches see https://github.com/git-for-windows/git/branches/active (click the green checkmarks). @fcharlie, A report back would be appreciated. |
Thanks for confirming. |
This issue is related to the Git for Windows Bash environment and has nothing to do with Git
Setup
defaults?
to the issue you're seeing?
** insert your response here **
Details
Git Bash
When I started a program in the Git-for-Windows Bash environment that had a path as a symbolic link, it passed the wrong Arg0. Before calling CreateProcess, Arg0 is resolved directly to the reparsepoint of the symbolic link, at which point the Argv0 of the process created is not consistent with the requirements.
For example:
We can create a C++ program like follow:
CMD output:
:: .\argv_symlink.exe "hello world" 0: .\argv_symlink.exe 1: hello world
MSYS2 output:
Git Bash output:
The text was updated successfully, but these errors were encountered: