lkml.org 
[lkml]   [1996]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: POSIX feature or Bug?
Date
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

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