Date: Fri, 14 Oct 2011 23:50:09 GMT From: Garrett Cooper <yanegomi@gmail.com> To: freebsd-doc@FreeBSD.org Subject: Re: docs/161673: mkdir(2) doesn't discuss EISDIR Message-ID: <201110142350.p9ENo9lI060617@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/161673; it has been noted by GNATS. From: Garrett Cooper <yanegomi@gmail.com> To: Jeremy Huddleston <jeremyhu@apple.com> Cc: freebsd-gnats-submit@freebsd.org Subject: Re: docs/161673: mkdir(2) doesn't discuss EISDIR Date: Fri, 14 Oct 2011 16:42:31 -0700 On Fri, Oct 14, 2011 at 4:24 PM, Jeremy Huddleston <jeremyhu@apple.com> wro= te: > >>Number: =A0 =A0 =A0 =A0 161673 >>Category: =A0 =A0 =A0 docs >>Synopsis: =A0 =A0 =A0 mkdir(2) doesn't discuss EISDIR >>Confidential: =A0 no >>Severity: =A0 =A0 =A0 non-critical >>Priority: =A0 =A0 =A0 low >>Responsible: =A0 =A0freebsd-doc >>State: =A0 =A0 =A0 =A0 =A0open >>Quarter: >>Keywords: >>Date-Required: >>Class: =A0 =A0 =A0 =A0 =A0doc-bug >>Submitter-Id: =A0 current-users >>Arrival-Date: =A0 Fri Oct 14 23:30:03 UTC 2011 >>Closed-Date: >>Last-Modified: >>Originator: =A0 =A0 Jeremy Huddleston >>Release: =A0 =A0 =A0 =A08.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 =A0 =A0 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/= GENERIC =A0amd64 > >>Description: > mkdir(2) can set errno to EISDIR, but the man page does not discuss this.= =A0You 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. = =A0I guess either update documentation or change the syscall to return EEXI= ST instead. You aren't the first one to ponder this question: http://lists.freebsd.org/pipermail/freebsd-hackers/2009-November/029940.htm= l -Garrett
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110142350.p9ENo9lI060617>