From: Mingming cao <cmm@us.ibm.com>
To: Linus Torvalds <torvalds@transmeta.com>, Al Viro <viro@math.psu.edu>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH]Fix bug:rmdir could remove current working directory
Date: Wed, 10 Oct 2001 17:02:53 -1000 [thread overview]
Message-ID: <3BC50BDD.6AA9642E@us.ibm.com> (raw)
In-Reply-To: <Pine.GSO.4.21.0110101743140.21168-100000@weyl.math.psu.edu> <3BC4EFFC.42ACE59E@us.ibm.com> <200110102317.f9ANHjN03120@penguin.transmeta.com>
Linus Torvalds wrote:
>
> In article <3BC4EFFC.42ACE59E@us.ibm.com>,
> Mingming cao <cmm@us.ibm.com> wrote:
> >
> >I thought about the case when rmdir() on the cwd of other processes,
> >but, as you said, that is implementation dependent. However rmdir() on
> >"." does returns EBUSY error.
>
> That's a completely different thing, though - even though the difference
> is rather subtle.
>
> You can remove pretty much any empty directory (if the filesystem
> permits it - some don't). HOWEVER, you can not use "." as the final
> component of your pathname.
>
> It has nothing to do with home directory: you can try just doing
>
> mkdir /tmp/hello
> rmdir /tmp/hello/.
>
> and you'll get the same error (and it _should_ return EINVAL, not EBUSY.
> EBUSY is for the "this filesystem doesn't allow you to remove a
> directory that is in use" case).
>
> Linus
I misunderstanded the rule. Thanks for clarifying!
--
Mingming Cao
next prev parent reply other threads:[~2001-10-11 0:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-11 0:32 [PATCH]Fix bug:rmdir could remove current working directory Mingming cao
2001-10-10 21:45 ` Alexander Viro
2001-10-11 1:03 ` Mingming cao
2001-10-10 22:09 ` Alexander Viro
2001-10-10 23:17 ` Linus Torvalds
[not found] ` <200110102317.f9ANHjN03120@penguin.transmeta.com>
2001-10-11 3:02 ` Mingming cao [this message]
2001-10-10 22:21 ` Ricky Beam
2001-10-10 23:36 ` John Levon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3BC50BDD.6AA9642E@us.ibm.com \
--to=cmm@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox