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 [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to