svn commit: r203990 - head/lib/libc/sys

Tim Kientzle kientzle at
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> wrote:
>> Author: phk
>> Date: Wed Feb 17 09:11:21 2010
>> New Revision: 203990
>> URL:
>> Log:
>>  Mention EISDIR as a possible errno.
>> Modified:
>>  head/lib/libc/sys/unlink.2
>     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 mailing list