Date: Wed, 17 Feb 2010 22:55:58 -0800 From: Tim Kientzle <kientzle@freebsd.org> To: Garrett Cooper <yanefbsd@gmail.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Poul-Henning Kamp <phk@freebsd.org> Subject: Re: svn commit: r203990 - head/lib/libc/sys Message-ID: <4B7CE47E.4090500@freebsd.org> In-Reply-To: <7d6fde3d1002171231u163ce4ao18478f4af6180d1b@mail.gmail.com> References: <201002170911.o1H9BL6m095996@svn.freebsd.org> <7d6fde3d1002171231u163ce4ao18478f4af6180d1b@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
Garrett Cooper wrote: > On Wed, Feb 17, 2010 at 1:11 AM, Poul-Henning Kamp <phk@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, Timhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B7CE47E.4090500>
