Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Delivered-To: mailing list cygwin@cygwin.com Message-Id: <5.1.0.14.2.20021025121713.02c33eb0@pop3.cris.com> X-Sender: rrschulz@pop3.cris.com Date: Fri, 25 Oct 2002 12:23:20 -0700 To: cygwin@cygwin.com From: Randall R Schulz Subject: Re: cd and pushd do not set $PWD and $cwd correctly in tcsh on NT In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Eugene, The shells track the current working directly internally based on the invocation of cd, pushd and popd commands. The binary executable "/bin/pwd.exe" must traverse the parent directory links to the root in order to discover the current working directory, since unlike the shells it has no prior notion of what the working directory is when it's invoked. It effectively reports a "canonical" curent directory name. There are counterparts to the kinds of discrepancies you're seeing in everyday Unix and Linux systems. In those systems (and in Cygwin) symbolic links are the usual way these discrepancies arise (offhand, they're the only way in Unix and Linux, but I may be overlooking something). There's really nothing to be done about the fact that directory names can be aliased, whether it's via Cygwin's unmounted drive directory (by default, "/cygdrive"), the aliasing that can occur in Cygwin do to its more flexible mount scheme or symlinks, which are equally possible in Cygwin and in Unix / Linux. Randall Schulz Mountain View, CA USA At 11:56 2002-10-25, Eugene_Reznik@putnam.com wrote: >I am runnning into the following problem: > > >1. start tcsh >2. cd / >3. cd c:/winnt > >After the last commnad the working directoy is /cygdrive/c/winnt. The >output of the pwd command confirms this. However, both $PWD and $cwd are >set to: /c:/winnt. See below: > > >/cygdrive/d> cd / > >16 /> cd c:/winnt > >17 /c:/winnt> pwd >/cygdrive/c/winnt >18 /c:/winnt> echo $PWD >/c:/winnt >19 /c:/winnt> echo $cwd >/c:/winnt >20 /c:/winnt> -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/