svn commit: r203990 - head/lib/libc/sys
kientzle at freebsd.org
Thu Feb 18 06:54:59 UTC 2010
Garrett Cooper wrote:
> On Wed, Feb 17, 2010 at 1:11 AM, Poul-Henning Kamp <phk at freebsd.org> wrote:
>> Author: phk
>> Date: Wed Feb 17 09:11:21 2010
>> New Revision: 203990
>> URL: http://svn.freebsd.org/changeset/base/203990
>> Mention EISDIR as a possible errno.
> This is wrong as per POSIX
> The file named by path is a directory, and either the calling process
> does not have appropriate privileges, or the implementation prohibits
> using unlink() on directories.
On a not-entirely-unrelated note, I wonder if
any of the POSIX experts around know whether POSIX
specifies an errno value for this call:
open("/", O_WRONLY | O_EXCL | O_CREAT, 0777)
I ran into this puzzler back when I was trying to optimize
the restore sequence for libarchive. As near as I've
been able to tell, POSIX is ambiguous here: It
requires EISDIR for open(O_WRONLY) on a dir and EEXIST
for open(O_EXCL | O_CREAT) on an existing item but
without any clear guidance on which of those takes
priority in this case.
Anyone think they know the answer?
More information about the svn-src-all