From owner-p4-projects@FreeBSD.ORG Tue Dec 11 17:11:41 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7301416A420; Tue, 11 Dec 2007 17:11:41 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C920116A419; Tue, 11 Dec 2007 17:11:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 989C013C45D; Tue, 11 Dec 2007 17:11:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.1/8.14.1) with ESMTP id lBBH8r1D052985; Tue, 11 Dec 2007 10:08:53 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 11 Dec 2007 10:09:31 -0700 (MST) Message-Id: <20071211.100931.-1149476179.imp@bsdimp.com> To: rwatson@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20071211101708.U71658@fledge.watson.org> References: <200712110715.lBB7FCT9046928@repoman.freebsd.org> <20071211101708.U71658@fledge.watson.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: perforce@FreeBSD.org Subject: Re: PERFORCE change 130618 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2007 17:11:41 -0000 In message: <20071211101708.U71658@fledge.watson.org> Robert Watson writes: : : On Tue, 11 Dec 2007, Warner Losh wrote: : : > http://perforce.freebsd.org/chv.cgi?CH=130618 : > : > Change 130618 by imp@imp_mbp on 2007/12/11 07:14:48 : > : > Darwin doesn't like it when you try to setrlimit NOFILE, so : > ignore the error in that case. This is lame, and I'm not sure : > what the right fix for this is. : > : > # Now we get to the version check in legacy before we barf-o-rama : : FYI, you can always take a look at the Darwin source for most UNIXesque tools, : including their variations on GNU and BSD makes. Cool. There's a bug on Darwin that both our make and their bsdmake have. MACHINE_ARCH is always unknown. I'll fix that in our sources and go take a look at Darwin. Warner : Robert N M Watson : Computer Laboratory : University of Cambridge : : > : > Affected files ... : > : > .. //depot/projects/arm/src/usr.bin/make/main.c#5 edit : > : > Differences ... : > : > ==== //depot/projects/arm/src/usr.bin/make/main.c#5 (text+ko) ==== : > : > @@ -901,7 +901,9 @@ : > : > #ifdef RLIMIT_NOFILE : > /* : > - * get rid of resource limit on file descriptors : > + * get rid of resource limit on file descriptors, but don't : > + * fail if we can't because OS X has this define, but we get : > + * EINVAL when we try to set it. : > */ : > { : > struct rlimit rl; : > @@ -909,9 +911,7 @@ : > err(2, "getrlimit"); : > } : > rl.rlim_cur = rl.rlim_max; : > - if (setrlimit(RLIMIT_NOFILE, &rl) == -1) { : > - err(2, "setrlimit"); : > - } : > + setrlimit(RLIMIT_NOFILE, &rl); : > } : > #endif : > : > :