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: List-Subscribe: List-Archive: List-Post: List-Help: , 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 Reply-To: cygwin AT cygwin DOT com Message-ID: <1606116423.20160429020650@yandex.ru> To: Gene Pavlovsky , cygwin AT cygwin DOT com Subject: Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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