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:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id :references:to; q=dns; s=default; b=w7vU44pERwoxVXOsa26xjprpCeaW o/e42dZWMfCHETDAQCqio3wc9xL2m1oqYa4uBImOKmbIQF11HquEBLf/2V/fHhG4 qwF4956g1jftmTCLPWZROG5l3zvJ0cEqUz9wNcsXBSY9YKkwGAci7bwzj8wuhG+r dUIk+ACWyRJiKVg= 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:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id :references:to; s=default; bh=DgNfw/959yTNRbOT9OfughwxAkE=; b=h6 PfvgIT6oslQctiAJNMynSqGhaZR3zspnqO+5FI3x18Xjk1U8+GKV5xYCPvAJV2Si pHl3zleLedkQ3PoldS8BQ2tp0vos9amgdiT/AL0LsnwtvID5hjMR4uaxyCUsaHun ruhtHo/3yO48JciYz8PiO7EvIYHInXEwEKXcDYTJI= 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=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 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: Sat, 24 Oct 2015 00:10:47 +1100 Cc: "cygwin AT cygwin DOT com" Message-id: References: <0D835E9B9CD07F40A48423F80D3B5A702E93D1BA AT USA7109MB022 DOT na DOT xerox DOT net> To: "Nellis, Kenneth" X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t9NDBEUP017525 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 native symlinks... Is that expected? I know I don't like it ;-) CYGWIN=winsymlinks:nativestrict Cheers, Mark. On 23 Oct 2015, at 11:35 PM, Nellis, Kenneth wrote: >> From: Mark O'Keefe >> >> Hi, >> >> 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. >> >> >> $ 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 >> >> 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. >> >> For what I'm doing I need the physical path, not the symbolic path (which >> is what the -P is meant to provide). >> >> Please confirm if I'm correct in my understanding? I've tested this on >> Ubuntu and it works as I'd expect it... >> >> 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). >> >> Thanks in advance for any help in resolving this. >> >> Cheers, >> Mark. > > FWIW, WJJFM: > > $ 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 > $ > > --Ken Nellis > > -- > 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 > -- 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