PERFORCE change 130618 for review
M. Warner Losh
imp at bsdimp.com
Tue Dec 11 09:11:41 PST 2007
In message: <20071211101708.U71658 at fledge.watson.org>
Robert Watson <rwatson at FreeBSD.org> writes:
:
: On Tue, 11 Dec 2007, Warner Losh wrote:
:
: > http://perforce.freebsd.org/chv.cgi?CH=130618
: >
: > Change 130618 by imp at 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
: >
: >
:
More information about the p4-projects
mailing list