Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759467Ab1FWOL3 (ORCPT ); Thu, 23 Jun 2011 10:11:29 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:61587 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754867Ab1FWOL1 convert rfc822-to-8bit (ORCPT ); Thu, 23 Jun 2011 10:11:27 -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=BZuTsBYyJSksbWYxyo0L0ATxygo82DHJghoI5qLzIUoTJaOkI9o1Igqu5I84SAQyJ8 O1P9toAw2uXAjFj5XvIZtT1Y7oQoumW2ofK0WxJ6SnU27iC5W/P9r3eOEw0Sy/ijkUQL 61SdDOPialf6NQTJ3b+GTU8YIyEOMt46cfIAg= MIME-Version: 1.0 In-Reply-To: References: <20110623153116.404f2a63.taeuber@bbaw.de> From: yuyichao-mit Date: Thu, 23 Jun 2011 10:11:04 -0400 X-Google-Sender-Auth: 7hSsWOxrGrBFPGbwkXeUGWnOwcE Message-ID: Subject: Re: extra slash in current path To: richard -rw- weinberger Cc: =?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: 1348 Lines: 66 On Thu, Jun 23, 2011 at 9:54 AM, richard -rw- weinberger wrote: > On Thu, Jun 23, 2011 at 3:32 PM, yuyichao-mit wrote: >> On Thu, Jun 23, 2011 at 9:31 AM, Lars T?uber wrote: >>> Hi, >>> >>> Am Thu, 23 Jun 2011 09:14:18 -0400 >>> yuyichao-mit schrieb: >>>> The problem is like this: >>>> >>>> $ cd / >>>> $ pwd >>>> / >>>> >>>> $ cd / >>>> $ pwd >>>> // >>> >>> didn't you mean?: >>> $ cd // >>> $ pwd >>> // >> >> yes, exactly. >> >> Sorry for the typo (copy-paste~~~) >> > > Is this really a kernel issue? > rw@raccoon:~> cd // > rw@raccoon://> pwd > // > rw@raccoon://> ls -l /proc/self/cwd > lrwxrwxrwx 1 rw users 0 23. Jun 15:53 /proc/self/cwd -> / well, that's true, but this is indeed the retrun value of get_current_dir_name. #include #include int main() { char *cwd = get_current_dir_name(); printf("%s\n", cwd); return 0; } $ cd // $ pwd // $ main // so is this a glibc stuff?? (that's y I also send to linux-c-programming.) > > -- > Thanks, > //richard > -- 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/