Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759538Ab1FWObK (ORCPT ); Thu, 23 Jun 2011 10:31:10 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:41064 "EHLO isrv.corpit.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753804Ab1FWObJ (ORCPT ); Thu, 23 Jun 2011 10:31:09 -0400 Message-ID: <4E034E2A.1010100@msgid.tls.msk.ru> Date: Thu, 23 Jun 2011 18:31:06 +0400 From: Michael Tokarev Organization: Telecom Service, JSC User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.16) Gecko/20110506 Icedove/3.0.11 MIME-Version: 1.0 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 Subject: Re: extra slash in current path References: <20110623153116.404f2a63.taeuber@bbaw.de> In-Reply-To: X-Enigmail-Version: 1.0.1 OpenPGP: id=804465C5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 668 Lines: 21 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/