delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/10/18/07:51:45

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Envelope-Sender-Is: Andrej DOT Borsenkow AT mow DOT siemens DOT ru (at relayer goliath.siemens.de)
From: "Andrej Borsenkow" <Andrej DOT Borsenkow AT mow DOT siemens DOT ru>
To: "Cygwin mailing list" <Cygwin AT Sourceware DOT Cygnus DOT Com>
Subject: /bin/pwd (getcwd) and symlinks
Date: Wed, 18 Oct 2000 15:50:47 +0400
Message-ID: <001901c038f9$a7a674d0$21c9ca95@mow.siemens.ru>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400

If a current directory is symlink, getcwd() on Unix returns directory, to
which this symlink points, while on Cygwin it returns directory itself:

mw1g017 AT MW1G17C% ls -l . sub
.:
total 0
drwxr-xr-x   2 mw1g017  ITS             0 Oct 18 15:40 real
drwxr-xr-x   2 mw1g017  ITS             0 Oct 18 15:40 sub

sub:
total 1
lrw-r--r--   1 mw1g017  ITS            18 Oct 18 15:40 fake -> ../real
mw1g017 AT MW1G17C% cd sub/fake
mw1g017 AT MW1G17C% /bin/pwd
/tmp/sub/fake

while on Unix this returns /tmp/real.

Is it intentional?

-andrej

Have a nice DOS!
B >>


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019