From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tokarev Subject: Re: extra slash in current path Date: Thu, 23 Jun 2011 18:31:06 +0400 Message-ID: <4E034E2A.1010100@msgid.tls.msk.ru> References: <20110623153116.404f2a63.taeuber@bbaw.de> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: yuyichao-mit Cc: richard -rw- weinberger , =?ISO-8859-1?Q?Lars_T=E4uber?= , linux-kernel@vger.kernel.org, linux-c-programming@vger.kernel.org 23.06.2011 18:11, yuyichao-mit wrote: >>>> $ cd // >>>> $ pwd >>>> // The current directory is cached in $PWD environment variable by shell (bash at least). This variable is checked in glibc (getcwd() et al) - if it is set and stat($PWD) is the same as stat("."), that value is used. It has nothing to do with kernel, probably the issue is in bash which somehow allows double slash for root dir (but not triple). /mjt