lkml.org 
[lkml]   [1999]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: rmdir of a busy directory
Alan Curry wrote:

> For as long as I can remember, if you removed a directory which is the
> current working directory of a process (for example, a shell), and then tried
> to do anything with that process that accesses the current working directory
> (for example, type "ls"), you'd get a ENOENT.
>
> Under 2.2, though, the opendir(".") succeeds and creates the appearance of an
> empty directory. Even stranger, attempts to creat() or mkdir() in the
> nonexistent directory yield EPERM.
>

This might also be consequence of the same problem:

mkdir <somedir>
cd <somedir>
rmdir .

Under all OSes I tried, the rmdir . command above returns an error. On linux >
2.1.124 (the version I first noticed to be affected) this silently succeeds.

BTW, this behaviour breaks building egcs/gcc/fixincludes for cross-compilers
under linux, because fixincludes (egcs-1.1b and egcs-1.1.1) contain a fragment
which rely on "rmdir ." failing.

> Is this now the expected behavior, or was there an accident in last-minute
> rmdir() changes?

Ralf.

--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:corsepiu@faw.uni-ulm.de FAX: +49/731/501-999
http://www.faw.uni-ulm.de




-
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.085 / U:1.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site