Re: POSIX feature or Bug?

Robert Nichols (rnichols@interaccess.com)
Sat, 21 Sep 1996 17:16:29 GMT


In article <BCA9C40FF9@rkdvmks1.ngate.uni-regensburg.de>,
Ulrich Windl <ulrich.windl@rz.uni-regensburg.de> wrote:
:In 2.0.20 I tried "cd /tmp; mkdir X; cd X; rmdir /tmp/X" with
:success. A subsequent "pwd" complains about the working directory...
:
:If it's not a feature, my NULL-understanding of the kernel internal
:suggests taht either the inode of the current working directory isn't
:locked, or the lock is ignored when removing a directory.
:
:Please tell me what's correct.

That's normal. Historically, the manpage for 'rmdir' has contained a
note that "Mildly unpleasant consequences may result from the removal of
your own, or someone else's, working directory." That note is not
present in FSF's manpage, but the warning still applies. There's little
reason to lock a CWD against removal since it's contents could still be
removed (and would have to be before removal of the directory itself).

-- 
Bob Nichols         rnichols@interaccess.com
Finger rnichols@cluster.interaccess.com for PGP public key.
PGP public key 1024/9A9C7955
Key fingerprint = 2F E5 82 F8 5D 06 A2 59  20 65 44 68 87 EC A7 D7