[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BANLkTin9bQ4hzs-odYU-Gxy-f-T+HLLAdQ@mail.gmail.com>
Date: Thu, 23 Jun 2011 10:11:04 -0400
From: yuyichao-mit <yuyichao@....edu>
To: richard -rw- weinberger <richard.weinberger@...il.com>
Cc: Lars Täuber <taeuber@...w.de>,
linux-kernel@...r.kernel.org, linux-c-programming@...r.kernel.org
Subject: Re: extra slash in current path
On Thu, Jun 23, 2011 at 9:54 AM, richard -rw- weinberger
<richard.weinberger@...il.com> wrote:
> On Thu, Jun 23, 2011 at 3:32 PM, yuyichao-mit <yuyichao@....edu> wrote:
>> On Thu, Jun 23, 2011 at 9:31 AM, Lars Täuber <taeuber@...w.de> wrote:
>>> Hi,
>>>
>>> Am Thu, 23 Jun 2011 09:14:18 -0400
>>> yuyichao-mit <yuyichao@....edu> 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@...coon:~> cd //
> rw@...coon://> pwd
> //
> rw@...coon://> 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 <unistd.h>
#include <stdio.h>
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists