lkml.org 
[lkml]   [1999]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: rmdir problem with remove("foo/.")
    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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.029 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site