Skip to content
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

Win32 executable launched via NTFS symlink doesn't respect symlink name #2909

Closed
awson opened this issue Feb 4, 2018 · 3 comments
Closed
Assignees
Labels

Comments

@awson
Copy link

awson commented Feb 4, 2018

Windows build 10.0.16299.214.

Let's we have some native win32 executable named foo.exe built from the following C code:

int main(int argc, char * argv[]){
  puts(argv[0]);
  return 0;
}

Let's we also have an NTFS symlink bar.exe pointing to this foo.exe.

CMD shell:

C:\test>bar.exe
bar.exe

WSL bash:

baz@qux:/mnt/c/test$ ./bar.exe
C:\test\foo.exe
@SvenGroot
Copy link
Member

I suspect this is because WSL's path resolution follows the symlink, so what we end up passing to CreateProcess is the symlink's target and not the symlink itself. Likely we could be smarter about this. Thanks for reporting!

@benhillis
Copy link
Member

Thanks for opening, drafting a fix for this now.

@benhillis
Copy link
Member

Fixed in build 17723.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants