delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/10/04/16:25:35

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-0.2 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4AC904A7.8080403@freesbee.fr>
Date: Sun, 04 Oct 2009 22:25:11 +0200
From: =?ISO-8859-1?Q?Vincent_Rivi=E8re?= <vincent DOT riviere AT freesbee DOT fr>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: symlinks show .exe
References: <4AC89364 DOT 9080301 AT freesbee DOT fr> <db95995b0910041312g3719caech1617a68167cdb0a1 AT mail DOT gmail DOT com>
In-Reply-To: <db95995b0910041312g3719caech1617a68167cdb0a1@mail.gmail.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

David Antliff wrote:
> In my experience, it should be possible to create symlinks to any
> arbitrary target, regardless of whether it actually exists or not.
> Therefore, if I create a symlink to "/bin/ls" then I'd expect that to
> be the content of the symlink - the automatic behaviour of rewriting
> it to "/bin/ls.exe" is unexpected and therefore probably incorrect
> according to some "standard" somewhere.

I totally agree.
The symlink target should be stored "as is" without further interpretation.

The example of non existing target is good.
An this gives me an idea:

$ mv /bin/ls /bin/ls.bak
$ ln -s /bin/ls lls
$ mv /bin/ls.bak /bin/ls
$ ls -l lls
lrwxrwxrwx 1 vincent cygwin 7 Oct  4 22:19 lls -> /bin/ls
$ ./lls

The symlink looks good and it works ;-)

-- 
Vincent Rivière

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019