Skip to content

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

Closed

Description

@awson

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

Activity

  1. SvenGroot commented on Feb 8, 2018

    @SvenGroot
    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!

  2. benhillis commented on Jun 28, 2018

    @benhillis
    Member

    Thanks for opening, drafting a fix for this now.

  3. benhillis commented on Jul 27, 2018

    @benhillis
    Member

    Fixed in build 17723.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions