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

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
Message-ID: <20001018124405.9125.qmail@web112.yahoomail.com>
Date: Wed, 18 Oct 2000 05:44:05 -0700 (PDT)
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Subject: Re: /bin/pwd (getcwd) and symlinks
To: Andrej Borsenkow <Andrej DOT Borsenkow AT mow DOT siemens DOT ru>,
Cygwin mailing list <Cygwin AT Sourceware DOT Cygnus DOT Com>
MIME-Version: 1.0

--- Andrej Borsenkow <Andrej DOT Borsenkow AT mow DOT siemens DOT ru> wrote:
> 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?
> 

It's implementation depedant.  On my HP-UX system it returns the symbolic link
name.  I could find no documentation stating that it should return the actual
directory.

Cheers,

=====
Earnie Boyd
mailto:earnie_boyd AT yahoo DOT com

---         <http://earniesystems.safeshopper.com>         ---
--- Cygwin: POSIX on Windows <http://gw32.freeyellow.com/> ---
---   Minimalist GNU for Windows <http://www.mingw.org/>   ---

__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf!  It's FREE.
http://im.yahoo.com/

--
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