Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Oct 2011 23:24:20 GMT
From:      Jeremy Huddleston <jeremyhu@apple.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   docs/161673: mkdir(2) doesn't discuss EISDIR
Message-ID:  <201110142324.p9ENOKvF067791@red.freebsd.org>
Resent-Message-ID: <201110142330.p9ENU35h039923@freefall.freebsd.org>

index | next in thread | raw e-mail


>Number:         161673
>Category:       docs
>Synopsis:       mkdir(2) doesn't discuss EISDIR
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 14 23:30:03 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Jeremy Huddleston
>Release:        8.1
>Organization:
Apple Inc
>Environment:
FreeBSD freebsd8.apple.com 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
mkdir(2) can set errno to EISDIR, but the man page does not discuss this.  You can use mkdir(1) to see this:

$ mkdir /
mkdir: /: Is a directory
$ mkdir /var
mkdir: /var: File exists

>How-To-Repeat:
$ mkdir /
mkdir: /: Is a directory
$ mkdir /var
mkdir: /var: File exists

>Fix:
I would expect EEXIST to be returned for /, but EISDIR was set instead.  I guess either update documentation or change the syscall to return EEXIST instead.

>Release-Note:
>Audit-Trail:
>Unformatted:


help

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