From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127859 invoked by alias); 23 Oct 2015 13:10:58 -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 127825 invoked by uid 89); 23 Oct 2015 13:10:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.2 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,MALFORMED_FREEMAIL,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: st11p02im-asmtp001.me.com Received: from st11p02im-asmtp001.me.com (HELO st11p02im-asmtp001.me.com) (17.172.220.113) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 23 Oct 2015 13:10:54 +0000 Received: from [192.168.1.108] (220-253-16-253.dyn.iinet.net.au [220.253.16.253]) by st11p02im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Mar 31 2015)) with ESMTPSA id <0NWO006VQCM09K40@st11p02im-asmtp001.me.com> for cygwin@cygwin.com; Fri, 23 Oct 2015 13:10:52 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-10-23_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=0 kscore.compositescore=1 compositescore=0.9 suspectscore=2 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0 spamscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1510090000 definitions=main-1510230216 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (1.0) Subject: Re: /bin/pwd -P doesn't expand all symlinks From: Mark O'Keefe In-reply-to: <0D835E9B9CD07F40A48423F80D3B5A702E93D1BA@USA7109MB022.na.xerox.net> Date: Fri, 23 Oct 2015 14:52:00 -0000 Cc: "cygwin@cygwin.com" Content-transfer-encoding: quoted-printable Message-id: References: <0D835E9B9CD07F40A48423F80D3B5A702E93D1BA@USA7109MB022.na.xerox.net> To: "Nellis, Kenneth" X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00405.txt.bz2 Thanks Ken, you gave me an idea. $ uname -srvmo CYGWIN_NT-6.3 2.3.0(0.290/5/3) 2015-09-08 22:33 x86_64 Cygwin I'm using native symlinks for compatibility. Turns out that if you use the = below option to create the symlink you get the behavior I'm seeing. If you = don't use this it works correctly. Guess the issue is in understanding nati= ve symlinks... Is that expected? I know I don't like it ;-) CYGWIN=3Dwinsymlinks:nativestrict Cheers, Mark. On 23 Oct 2015, at 11:35 PM, Nellis, Kenneth wro= te: >> From: Mark O'Keefe >>=20 >> Hi, >>=20 >> While using /bin/pwd -P to expand directories to get the absolute, non- >> symlinked version of the directory I discovered that this doesn't work on >> Cygwin as I believe it is meant to work. >>=20 >>=20 >> $ cd /tmp >> $ /bin/pwd -P >> /tmp >> $ ln -s /home . >> $ cd home >> $ /bin/pwd -P >> /home >> $ pwd >> /tmp/home >> $ mkdir dummy >> $ cd dummy >> $ pwd >> /tmp/home/dummy >> $ /bin/pwd -P >> /tmp/home/dummy >>=20 >> NOTE: That last command should have returned "/home/dummy". It hasn't >> expanded the parent symbolic link as you would have expected it to do. >>=20 >> For what I'm doing I need the physical path, not the symbolic path (which >> is what the -P is meant to provide). >>=20 >> Please confirm if I'm correct in my understanding? I've tested this on >> Ubuntu and it works as I'd expect it... >>=20 >> Now having to create an alternative approach to get the correct answer >> while I wait for this to be fixed (assuming it is a bug as I believe it >> is). >>=20 >> Thanks in advance for any help in resolving this. >>=20 >> Cheers, >> Mark. >=20 > FWIW, WJJFM: >=20 > $ cd /tmp > $ /bin/pwd -P > /tmp > $ ln -s /home . > $ cd home > /tmp/home > $ /bin/pwd -P > /home > $ pwd > /tmp/home > $ mkdir dummy > $ cd dummy > /tmp/home/dummy > $ pwd > /tmp/home/dummy > $ /bin/pwd -P > /home/dummy > $ uname -srvmo > CYGWIN_NT-6.1 2.2.1(0.289/5/3) 2015-08-20 11:42 x86_64 Cygwin > $ >=20 > --Ken Nellis >=20 > -- > 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 >=20 -- 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