Subject: rmdir(".")
To: None <tech-kern@NetBSD.org>
From: Roland Illig <rillig@NetBSD.org>
List: tech-kern
Date: 09/09/2005 09:57:10
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. ;))
http://www.opengroup.org/onlinepubs/009695399/functions/rmdir.html says
removing the current working directory is allowed.
By the way, the error code is wrong. It should not be EINVAL, but EBUSY.
Roland