Re: `rmdir .` doesn't work in 2.4

Andrea Arcangeli (andrea@suse.de)
Mon, 8 Jan 2001 23:37:34 +0100


On Mon, Jan 08, 2001 at 03:11:08PM -0700, Benson Chow wrote:
> Not very portable at all...
>
> hpux = HP/UX 10.2
>
> hpux:~$ mkdir foo
> hpux:~$ cd foo
> hpux:~/foo$ rmdir "`pwd`"
> rmdir: /home/blc/foo: Cannot remove mountable directory
> hpux:~/foo$ rmdir .
> rmdir: cannot remove .. or .
> hpux:~/foo$ rmdir /home/blc/foo
> rmdir: /home/blc/foo: Cannot remove mountable directory
> hpux:~/foo$ rmdir ./
> rmdir: ./: Cannot remove mountable directory
> hpux:~/foo$
>
> Maybe HP/UX is messed up as well.

It seems not to return -EBUSY. As also mentioned by Andries:

If the directory is the root directory or the current working directory
of any process, it is unspecified whether the function succeeds, or
whether it fails and sets errno to [EBUSY].

The portable way is the one I mentioned as possible change for my code:

os.chdir("..")
shutil.rmtree(binutils_build)

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