From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103623 invoked by alias); 28 Apr 2016 23:20:20 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 103611 invoked by uid 89); 28 Apr 2016 23:20:19 -0000 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 Received: from smtp.ht-systems.ru (HELO smtp.ht-systems.ru) (78.110.50.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 28 Apr 2016 23:20:17 +0000 Received: from [95.165.144.62] (helo=darkdragon.lan) by smtp.ht-systems.ru with esmtpa (Exim 4.80.1) (envelope-from ) (Authenticated sender: postmaster@rootdir.org) id 1avvEA-00049M-V3 ; Fri, 29 Apr 2016 02:20:11 +0300 Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Thu, 28 Apr 2016 23:06:51 -0000 Date: Thu, 28 Apr 2016 23:48:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <1606116423.20160429020650@yandex.ru> To: Gene Pavlovsky , cygwin@cygwin.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 X-SW-Source: 2016-04/txt/msg00632.txt.bz2 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