lkml.org 
[lkml]   [1999]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: rmdir of one's pwd (was Re: rmdir of a busy directory)


    On Fri, 12 Feb 1999, Thierry Danis wrote:

    > >
    > >
    > >
    > > On Fri, 12 Feb 1999, Ralf Corsepius wrote:
    > >
    > > [snip rmdir . not failing on Linux]
    > > > > You never tried 4.4BSD, right?
    > > > True.
    > > Arrghhh... Turns out that I also didn't.
    > >
    > > $ mkdir foo
    > > $ (cd foo; sleep 10) &
    > > $ rmdir foo
    > > $ mkdir bar
    > > $ cd bar
    > > $ rmdir .
    > > rmdir: bar: Invalid argument
    s/bar/./
    Sorry for braino.
    > > $ uname
    > > FreeBSD
    > > $
    >
    > That's probably because 'rmdir' checks for its argument.

    Nope. Look into /sys/kern/vfs_syscalls.c::rmdir() and after namei(&nd)
    you'll see the explicit comparison of vnode you got with vnode that used
    to be pwd when the ND_INIT_... was issued.


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:50    [W:0.020 / U:1.016 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site