lkml.org 
[lkml]   [2008]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: umount -l <path>, getcwd and /proc/<pid>/cwd inconsistent
From
Date

On Mon, 2008-01-07 at 09:29 +0100, Bauke Jan Douma wrote:
> Ian Kent wrote on 07-01-08 04:17:
> > Hi all,
> >
> > Could someone please help me understand what's happening with, what
> > looks like inconsistent behavior, between getpwd and procfs readlink.
> >
> > Basically, from a bash shell, setting working directory to a mounted
> > directory all is fine with "pwd" and "/proc/<pid>/cwd". Following a
> > "umount - l" on the mount "pwd" continues to return the expected string
> > but "/proc/<pid>/cwd" returns an empty string.
> >
> > What I'm really after is why this happens because sys_getcwd and
> > proc_pid_readlink appear to do essentially the same thing to get the
> > string.
> >
> [snip]
>
> What does `/bin/pwd' return, when you do that instead of
> plain `pwd' (after the umount)?

I did check that at one point and it returned the same as pwd.
I'll check again later, but I remember I explicitly checked that along
the way.

Ian




\
 
 \ /
  Last update: 2008-01-07 09:59    [W:0.098 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site