From owner-svn-src-all@FreeBSD.ORG Mon Jun 15 23:23:07 2009 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 6D5A41065674; Mon, 15 Jun 2009 23:23:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3F9188FC1F; Mon, 15 Jun 2009 23:23:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id EA13D46B7F; Mon, 15 Jun 2009 19:23:06 -0400 (EDT) Received: from fiver.baldwin.cx (localhost [IPv6:::1]) by bigwig.baldwin.cx (Postfix) with ESMTPA id C5E5A8A070; Mon, 15 Jun 2009 19:23:05 -0400 (EDT) Message-ID: <4A36D7D9.8050100@FreeBSD.org> Date: Mon, 15 Jun 2009 19:23:05 -0400 From: John Baldwin User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <200906152038.n5FKctaR001026@svn.freebsd.org> In-Reply-To: <200906152038.n5FKctaR001026@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 15 Jun 2009 19:23:05 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-3.5 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Subject: Re: svn commit: r194262 - in head: include lib/libc/sys sys/compat/freebsd32 sys/kern tools/regression/file/closefrom 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: Mon, 15 Jun 2009 23:23:07 -0000 John Baldwin wrote: > Author: jhb > Date: Mon Jun 15 20:38:55 2009 > New Revision: 194262 > URL: http://svn.freebsd.org/changeset/base/194262 > > Log: > Add a new 'void closefrom(int lowfd)' system call. When called, it closes > any open file descriptors >= 'lowfd'. It is largely identical to the same > function on other operating systems such as Solaris, DFly, NetBSD, and > OpenBSD. One difference from other *BSD is that this closefrom() does not > fail with any errors. In practice, while the manpages for NetBSD and > OpenBSD claim that they return EINTR, they ignore internal errors from > close() and never return EINTR. DFly does return EINTR, but for the common > use case (closing fd's prior to execve()), the caller really wants all > fd's closed and returning EINTR just forces callers to call closefrom() in > a loop until it stops failing. > > Note that this implementation of closefrom(2) does not make any effort to > resolve userland races with open(2) in other threads. As such, it is not > multithread safe. > > Submitted by: rwatson (initial version) > Reviewed by: rwatson > MFC after: 2 weeks Sorry about the userland build breakage. It looks like Kerberos is fixed already. I expect OpenSSH to also be broken due to its local version of closefrom(). I am kicking off a full world build now to fix any remaining issues (unless someone else beats me to it first). -- John Baldwin