Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jun 2006 02:08:28 +0200
From:      Pieter de Goeje <pieter@degoeje.nl>
To:        freebsd-hackers@freebsd.org
Cc:        mal content <artifact.one@googlemail.com>
Subject:   Re: Strange behaviour from mkdir()?
Message-ID:  <200606060208.28838.pieter@degoeje.nl>
In-Reply-To: <8e96a0b90606041148g5674ca31r74be2e1f9c79b640@mail.gmail.com>
References:  <8e96a0b90606041148g5674ca31r74be2e1f9c79b640@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi MC,

On Sunday 04 June 2006 20:48, mal content wrote:
> Is this expected behaviour (I'm using the mkdir utility
> for the example, but the problem occurs using the system
> call directly):
>
> # mkdir .
> mkdir: .: File exists
> # mkdir ..
> mkdir: ..: File exists
>
> Now, the unusual one:
>
> # mkdir /
> mkdir: /: Is a directory
>
> Shouldn't it say 'file exists'?
In fact, the _only_ directory that I could find that shows this behaviour 
is /. (I am using 6-stable)

>
> The mkdir() man page doesn't say that the function can set
> errno to EISDIR and yet that's what's happening here.
>

I did some research on it, and it seems the mkdir utility is aware of the 
EISDIR error. Kinda weird if you ask me, since it isn't documented.

Pieter de Goeje



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606060208.28838.pieter>