Subject: Re: rmdir(".")
To: Roland Illig <rillig@NetBSD.org>
From: Eric Haszlakiewicz <erh@jodi.nimenees.com>
List: tech-kern
Date: 09/09/2005 10:57:50
On Fri, Sep 09, 2005 at 09:57:10AM +0200, Roland Illig wrote:
> Hi folks,
> 
> is there any technical reason for not allowing rmdir("."), or is it just 
> to protect the user from something {s,}he might eventually not want to 
> do? I'm not interested in a flame war, I just want to know the reasons 
> for it. (I'm still too young to know everything about Unix-like systems. ;))

Unless you make a special case for it, rmdir(".") implies "remove the directory
entry named "." from the directory that you are currently in".  That would
leave you with an invalid directory that is still attached elsewhere in
the tree.

eric