lkml.org 
[lkml]   [1999]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: rmdir of one's pwd (was Re: rmdir of a busy directory)
Andreas Schwab wrote:
>
> Ralf Corsepius <corsepiu@faw.uni-ulm.de> writes:
>
> |> Linus Torvalds wrote:
> |>
> |> > Show me POSIX or other standards that say that you can't do it, and I
> |> > guess I have to work around a standards problem, but right now I say that
> |> > if programs ask for 'rmdir(".")', then they had better get it. I don't
> |> > think the OS should second-guess anybody.
> |>
> |> I don't know about a formal standard, either.
>
> >From SUS2:
>
> "If the directory is the root directory or the current working directory
> of any process, it is unspecified whether the function succeeds, or
> whether it fails and sets errno to [EBUSY]."
>
> Btw, they don't talk about EINVAL.

The stuff about EINVAL was in P1003.1a (Circa 1995):

5.5.2.4 Remove a Directry -- Errors (POSIX.1 Line 538) Add new errors
and descriptions following [EEXIST] or [ENOTEMPTY]

[EINVAL] The _path_ argument contains a last component that is dot
or dot-dot.

I don't know if this was ever formally adopted. Last I knew, it was
still just a draft (I have the D12 version)...

-Tom
--
Tom Eastep
Compaq Computer Corporation
Enterprise Computing Group
Tandem Division
tom.eastep@compaq.combegin:vcard
n:Eastep;Tom
x-mozilla-html:TRUE
org:Compaq Computer Corporation;Tandem Division
adr:;;;;;;
version:2.1
email;internet:tom.eastep@compaq.com
x-mozilla-cpt:;-6528
fn:Tom Eastep
end:vcard
\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.120 / U:0.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site