From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128924 invoked by alias); 1 Sep 2018 06:54:02 -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 128914 invoked by uid 89); 1 Sep 2018 06:54:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=readers, discretion, inglis, Inglis X-HELO: smtp-out-no.shaw.ca Received: from smtp-out-no.shaw.ca (HELO smtp-out-no.shaw.ca) (64.59.134.12) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 01 Sep 2018 06:53:59 +0000 Received: from [192.168.1.100] ([24.64.240.204]) by shaw.ca with ESMTP id vznAf1EDTWppDvznBf3Trt; Sat, 01 Sep 2018 00:53:58 -0600 Reply-To: Brian.Inglis@SystematicSw.ab.ca Subject: Re: error in "cygpath" behavior To: cygwin@cygwin.com References: <20180831085734.GF6350@calimero.vinschen.de> <5b89c269.1c69fb81.84d1a.6f1b@mx.google.com> From: Brian Inglis Openpgp: preference=signencrypt Message-ID: <1425002e-641b-1e25-3906-f1f16690d23c@SystematicSw.ab.ca> Date: Sat, 01 Sep 2018 06:54:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <5b89c269.1c69fb81.84d1a.6f1b@mx.google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00002.txt.bz2 On 2018-08-31 16:34, Steven Penny wrote: > On Fri, 31 Aug 2018 10:57:34, Corinna Vinschen wrote: >> Long-standing behaviour.  ".." in Cygwin and ".." in Windows can totally >> disagree.  The path is always convert to absolute at this point in favor >> of correct output.  There's also the additional restriction (though >> not in this case) that relative Windows paths must not be longer than >> MAX_PATH (260) chars. >> I'm certainly open to patches to the underlying cygwin_conv_path >> function to change the Windows path to relative if possible. > I am not understanding - it appears that "dot-dot" (..) is well defined by > POSIX: >> The special filename dot-dot shall refer to the parent directory of its >> predecessor directory. As a special case, in the root directory, dot-dot may >> refer to the root directory itself. > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13 > so it would appears that ".." would be an acceptable return value in any case. See Eric Blake's response to other poster. Proc FS entry /proc/self/cwd only links to the current working directory, and may/does? not necessarily reflect the logical or physical path taken by cd to get to the current directory: only the current shell tracks the logical or physical path taken by cd to get to the current directory, and can interpret to which directory .. refers. If /proc/self/cwd tracked all processes' logical or physical paths taken by chdir(2) to get to the current directory, that link might be used to resolve .. unambiguously. Quoting Corinna: "PGA" ;^> -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- 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