From owner-svn-src-all@FreeBSD.ORG Thu Feb 18 06:54:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B23D1106568B; Thu, 18 Feb 2010 06:54:59 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 4CC708FC12; Thu, 18 Feb 2010 06:54:58 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.3/8.14.3) id o1I6t6PO071100; Thu, 18 Feb 2010 06:55:06 GMT (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id xhu7gah9jcrtcpu2wm2i34q6mn; Thu, 18 Feb 2010 06:55:06 +0000 (UTC) (envelope-from kientzle@freebsd.org) Message-ID: <4B7CE47E.4090500@freebsd.org> Date: Wed, 17 Feb 2010 22:55:58 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.21) Gecko/20090601 SeaMonkey/1.1.16 MIME-Version: 1.0 To: Garrett Cooper References: <201002170911.o1H9BL6m095996@svn.freebsd.org> <7d6fde3d1002171231u163ce4ao18478f4af6180d1b@mail.gmail.com> In-Reply-To: <7d6fde3d1002171231u163ce4ao18478f4af6180d1b@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Poul-Henning Kamp Subject: Re: svn commit: r203990 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 06:54:59 -0000 Garrett Cooper wrote: > On Wed, Feb 17, 2010 at 1:11 AM, Poul-Henning Kamp 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 > (): > > [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