delorie.com/archives/browse.cgi | search |
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>, |
"Earnie Boyd" <earnie_boyd AT yahoo DOT com>, | |
"Egor Duda" <cygwin AT sources DOT redhat DOT com> | |
Subject: | RE: /bin/pwd (getcwd) and symlinks |
Date: | Wed, 18 Oct 2000 17:27:35 +0400 |
Message-ID: | <000801c03907$2d8689c0$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) |
In-reply-To: | <13414742969.20001018171853@logos-m.ru> |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
Importance: | Normal |
> > Wednesday, 18 October, 2000 Earnie Boyd earnie_boyd AT yahoo DOT com wrote: > > EB> --- 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: > >> > >> while on Unix this returns /tmp/real. > [...] > EB> It's implementation depedant. On my HP-UX system it returns > the symbolic link > EB> name. I could find no documentation stating that it should > return the actual > EB> directory. > > are you sure you've run "/bin/pwd"? Some shells (including bash) have > internal pwd, which prints "symlinked" name. > :-))) Yep. Speaking about "some shells" - it was exact reason why I noticed it. Zsh has chaselinks option that forces built-in pwd command resolve symbolic links. This option has no effect on cygwin because getcwd always returns symbolic link. To avoid using getcwd we'd need to reimplement cygdrive handling in zsh. Makes no sense. -andrej -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |