Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758919Ab1FWOxk (ORCPT ); Thu, 23 Jun 2011 10:53:40 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:43432 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752319Ab1FWOxi convert rfc822-to-8bit (ORCPT ); Thu, 23 Jun 2011 10:53:38 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=vNNMcQL5bjDPIPFatwT7D6rGUC+j5sCPmxIDO7BoX3+j+XowOaaXLmBT/uucUoEJlF IP2Qw3RLI6HF0K6eHdwyksERaCA0MtxWsAiODhoymcH5IZjVcSO53aSes11fa0zdzPn9 BbX8fkhp1nP8N2ew/MMFbSI2KAQ8sv4iQKyBU= MIME-Version: 1.0 In-Reply-To: <4E034E2A.1010100@msgid.tls.msk.ru> References: <20110623153116.404f2a63.taeuber@bbaw.de> <4E034E2A.1010100@msgid.tls.msk.ru> From: yuyichao-mit Date: Thu, 23 Jun 2011 10:53:17 -0400 X-Google-Sender-Auth: aWUN7xL4usKsTOthamYlwntyXwA Message-ID: Subject: Re: extra slash in current path To: Michael Tokarev Cc: richard -rw- weinberger , =?ISO-8859-1?Q?Lars_T=E4uber?= , linux-kernel@vger.kernel.org, linux-c-programming@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 853 Lines: 28 On Thu, Jun 23, 2011 at 10:31 AM, Michael Tokarev wrote: > 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). u r right. chdir in c and cd in csh doesn't have this problem. it is bash stuff. > > /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/