This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Symlink targets dereferenced when winsymlinks:native


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.

> 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.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpZvwy0Nky22.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]