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

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:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; q=dns; s=default; b=uJ
hoS9NeMVDP6zbW8BBHsvXbjs1yG0BAREZEpKB4eiNZZ6ckwofMveLpFCnVpYKyAD
6HR0EBnwLbzj0II11LcJvcpuqxyx+nexVtuPE0ly1RkUibAX5FL3tyHd8RTljSos
IbHB6fP5CamUiUyKddY3jiT7bhfEWapwZy44x75xo=
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:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; s=default; bh=EFn8HoNN
iaVu67/9e2CPVffnjoA=; b=xjXNGA3wtNA4irY/5l5EBK1pJT2EqMTxzh9El8jx
nvsXE7/w5g7OjFRTgD9CXzrZmzjym0ScqG6rCHJXvWuj8lQqo3yzsUsA+dQ2d26J
xJHOTUVq/kBKiq4zMAhp1NSEPNxGs1xl5t1PPcGGVIeOKTcZLRRud6urDL8MCcSf
81c=
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=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Pavlovsky, pavlovsky, pavlovsky!, Pavlovsky!
X-HELO: mail-ig0-f196.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=Cy+yHo80moY7EPUMzX4OaJmc7jmkQSQju09TnGC5DfY=; b=ACkuDD5ld05W8cvtk+1pgTJbU6ETz4+23u1FzWTuKyGaNC+NTjw7cmUIhXpFYaYchv VcfpWhulaIEa1iwGr2wBuf09SaF3ppikDr3PrcfgTWPsSCxwM7LhaSkbLFrGPVo+GN3D ivqWwM9O82/Fivada2h2C9xM8wv7+U5PiaWo7HQBUQZ6qWjUaDzQ1cDeSyl7YSmm6xmC ymSADTmpWP5hOhMxPaQ2TQAqZAHg2VQxUVbwZDXyXJvssDMCnzVB0lfFbtSzgAWnfnh7 0R4ouDzC/QKH6Pq9aD3gf1aBy6xd70JtzAhIk+zaZPHAe+ZCArL3C4GSZL6op57Mrg76 bkBw==
X-Gm-Message-State: AOPr4FVdWeBfYDNg9rAmJB/A1HHKpVyBolSvsK7pLROffk16bMr63/fvqc/93WyVdTvpJxrVz5oFewZM32BkQg==
MIME-Version: 1.0
X-Received: by 10.50.29.39 with SMTP id g7mr806199igh.50.1461888349765; Thu, 28 Apr 2016 17:05:49 -0700 (PDT)
In-Reply-To: <1606116423.20160429020650@yandex.ru>
References: <CAPTiy3NUXprQL6V0+Njc2L7XfhpqtC7oWFwNMhOEFZ2OZmddoQ AT mail DOT gmail DOT com> <1606116423 DOT 20160429020650 AT yandex DOT ru>
Date: Fri, 29 Apr 2016 03:05:49 +0300
Message-ID: <CAPTiy3OZC7acPvJRN0QtqjzfcFpnoxJkud3MTKQQVTCRr6vJVg@mail.gmail.com>
Subject: Re: `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist
From: Gene Pavlovsky <gene DOT pavlovsky AT gmail DOT com>
To: cygwin AT cygwin DOT com

I don't know if POSIX standard has something to say about that, but
here's a reference from GNU libc:

`man 2 symlink`:
>       A symbolic link (also known as a soft link) may point to an existing file or to a nonexistent one; the latter case is known as a dangling link.

On 29 April 2016 at 02:06, Andrey Repin <anrdaemon AT yandex DOT ru> wrote:
> 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