From owner-svn-src-head@FreeBSD.ORG Mon May 30 21:51:57 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEFA8106566B; Mon, 30 May 2011 21:51:57 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3F61B8FC14; Mon, 30 May 2011 21:51:56 +0000 (UTC) Received: by vws18 with SMTP id 18so4007817vws.13 for ; Mon, 30 May 2011 14:51:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=lp3D+u28BQ31oCSiY+tsaopWai4kB4o8boVZFphhcas=; b=tV7XEOiZ3/Bipzw0YxH9/bdBkvFdUL/tACCpcS1suLaNkWeBlcNqL7GTEr+M9j9JWc hLlXQFnRnXrtkwuVFxQaIWALcQsfbQVjN/QaR2sp2GHXqzYtJOsrGcsah3bGX7+WuDwZ 1DeIe3mQIXA9JgsS/f/IzGmwxAtkkYYIiiM3k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=IE44FVYnGAPjzeGHPApkx0+ucub7WJYCBBw8r0AQUFeVbixjPKHlzl30slkdRT0ZoH 6FtMBgnth+rynPwZYISgijr3Xt4ngADULfaafplvzxZQTFmRmTekkZnvnDKV02l7+EG3 OCK1IH2xQM8gFH8Y92N0GDjGoz98VhFLOndZk= MIME-Version: 1.0 Received: by 10.220.105.75 with SMTP id s11mr1999667vco.73.1306792316205; Mon, 30 May 2011 14:51:56 -0700 (PDT) Received: by 10.220.183.11 with HTTP; Mon, 30 May 2011 14:51:56 -0700 (PDT) In-Reply-To: <201105302141.p4ULf6HB094332@svn.freebsd.org> References: <201105302141.p4ULf6HB094332@svn.freebsd.org> Date: Mon, 30 May 2011 14:51:56 -0700 Message-ID: From: Garrett Cooper To: Jilles Tjoelker Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r222511 - head/lib/libc/gen X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2011 21:51:57 -0000 On Mon, May 30, 2011 at 2:41 PM, Jilles Tjoelker wrote= : > Author: jilles > Date: Mon May 30 21:41:06 2011 > New Revision: 222511 > URL: http://svn.freebsd.org/changeset/base/222511 > > Log: > =A0posix_spawn(): Do not fail when trying to close an fd that is not open= . > > =A0As noted in Austin Group issue #370 (an interpretation has been issued= ), > =A0failing posix_spawn() because an fd specified with > =A0posix_spawn_file_actions_addclose() is not open is unnecessarily harsh= , and > =A0there are existing implementations that do not fail posix_spawn() for = this > =A0reason. ... The manpage should probably be updated: 5. If the file_actions argument is not NULL, and specifies any close= , dup2, or open actions to be performed, and if posix_spawn() or posix_spawnp() fails for any of the reasons that would cause close(), dup2(), or open() to fail, an error value is returned as described by close(), dup2(), and open(), respectively (or, if th= e error occurs after the calling process successfully returns, the child process exits with exit status 127). An open file action ma= y, by itself, result in any of the errors described by close() or dup2(), in addition to those described by open().