Garrett Cooper wrote:
On Wed, Feb 17, 2010 at 1:11 AM, Poul-Henning Kamp <p...@freebsd.org> wrote:
Author: phk
Date: Wed Feb 17 09:11:21 2010
New Revision: 203990
URL: http://svn.freebsd.org/changeset/base/203990

Log:
 Mention EISDIR as a possible errno.

Modified:
 head/lib/libc/sys/unlink.2

    This is wrong as per POSIX
(<http://www.opengroup.org/onlinepubs/000095399/functions/unlink.html>):

[EPERM]
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?

Cheers,

Tim

_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to