delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/04/28/19:20:40

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=Ndrr2LuPa8m/qYqF
5/rhv6eAHy8MBHb4NQ05wXNjc8Mfdxaqgwqm0GBoqQWGY44OGWlM08httiP2X+9W
wTwq6doH4AyH28g+5Zfk+8Got2+low3J9TLs32tRl49ZSlrxb38iEG7zGLH+j3Bn
q2dFPOmkhfnaVySOx1sw0M1ZEzk=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=hm5ke1ZRCy0LPOMY00mycd
uYkzs=; b=e85o7x/kHgrTidTqiR1Ein5HR3WRenkZRnJZKU8fIPELb+0xYnzX/A
407TasKUUC63cIKVhkoxypqhEYnQltnFg38CfEQrhzN7vi1u36OkhcUoL/b5iQKG
WgWIlZAo7ZfxtrYyl0bHfhtwPry+7pd2/f5M/G5rqdyCIHxVa9xOI=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=4.0 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy=H*UA:Bat!, H*x:Bat!, H*r:sk:postmas, H*UA:Home
X-HELO: smtp.ht-systems.ru
Date: Fri, 29 Apr 2016 02:06:50 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <1606116423.20160429020650@yandex.ru>
To: Gene Pavlovsky <gene DOT pavlovsky AT gmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist
In-Reply-To: <CAPTiy3NUXprQL6V0+Njc2L7XfhpqtC7oWFwNMhOEFZ2OZmddoQ@mail.gmail.com>
References: <CAPTiy3NUXprQL6V0+Njc2L7XfhpqtC7oWFwNMhOEFZ2OZmddoQ AT mail DOT gmail DOT com>
MIME-Version: 1.0
X-IsSubscribed: yes

Greetings, Gene Pavlovsky!

> I have an issue to report:

> Introduction: On a UNIX system, `ln -s target link` creates a link
> regardless of target's existence.
> This is used in some scripts, e.g. Gentoo's `run-crons` (which I also
> use on Cygwin) uses a symlink pointing to the running process PID as
> lockfile.
> Issue: if `CYGWIN=winsymlinks:nativestrict` env var is set, running
> `ln -s target link` completely fails (even though running `mklink link
> target` in `cmd.exe` succeeds, same as `ln -s` does on UNIX). If
> `CYGWIN=winsymlinks:native`, a non-native link is created.

> So, `nativestrict` might break some (admittedly unorthodox) scripts.
> With `native` these script work, but still a native link would be
> preferrable and it is possible to create, but a non-native link is
> created instead.

> Bottom line, I think the native symlink creation code should be
> checked and a possibility should be added to create links to
> non-existent targets, rather than the current behavior of failing.

This is actually an arguable behavior, even in Linux. I can imagine the
behavior is "undefined" in such a case.
But I'll leave final say to the more experienced members of the list.


-- 
With best regards,
Andrey Repin
Friday, April 29, 2016 01:55:21

Sorry for my terrible english...


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