Re: rmdir problem with remove("foo/.")

Guest section DW (dwguest@win.tue.nl)
Fri, 26 Mar 1999 22:36:40 +0100 (MET)


From: Greg Wolodkin <greg@mathworks.com>

[1.] glibc remove("foo/.") removes foo with 2.2.2, not with 2.0.36
[2.] Full description:

I ran into this problem on a Debian 2.1 system that had been
upgraded to the 2.2.2 kernel. I was able to "fix" the problem
by going back to the 2.0.36 kernel. I saw some related threads
(adding special cases for "." and ".." in rmdir) but nothing
exactly like what I'm seeing.

>From the man page for remove(3), directories should remain intact.
This simple C program proves otherwise with the 2.2.2 kernel.

#include <stdio.h>
void main (void) { remove("foo/."); }

At first I suspected glibc but traced the remove function there
back to an rmdir system call.

You are being inconsistent.
If remove() is documented not to remove directories,
but it calls rmdir() then that must be a glibc bug.

There is nothing very wrong with rmdir removing "foo/.".

(And we just had a thread about this. Look at the archives.)

-
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/