Symlink targets dereferenced when winsymlinks:native
David Macek
david.macek.0@gmail.com
Wed Nov 18 18:13:00 GMT 2015
On 18. 11. 2015 18:55, Corinna Vinschen wrote:
> On Nov 17 23:28, David Macek wrote:
>> Hi.
>>
>> I went through the UG looking for differences between regular Cygwin
>> symlinks and NTFS symlinks, but couldn't find this documented. It
>> seems that when using winsymlinks:native, the target path is first
>> dereferenced before storing it in the link.
>
> It's a result of the native symlink being a Windows path. The
> ultimate conversion from POSIX to Windows path dereferences all
> symlinks.
Should that behaviour stay? If not, I can send a patch for the UG.
>> That doesn't happed when
>> using regular symlink files. Is this behaviour intentional / known?
>>
>> If it matters, the use case is `ln -sf /proc/self/fd /dev/fd`.
>
> It matters. This is a bug in Cygwin, a missing test in fact. It should
> never allow to create native symlinks to targets which only exist inside
> of Cygwin. Consider that /proc/self/fd has no meaning to non-Cygwin
> processes at all. Creating this symlink as native symlink doesn't make
> any sense, they should always be generated as Cygwin-only symlinks.
>
> Thanks for the report, I'll apply a matching patch.
Cool.
--
David Macek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4254 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20151118/acccf3e6/attachment.p7s>
More information about the Cygwin
mailing list