svn commit: r246381 - projects/cider/usr.bin/make
Alfred Perlstein
alfred at FreeBSD.org
Wed Feb 6 04:37:53 UTC 2013
Author: alfred
Date: Wed Feb 6 04:37:53 2013
New Revision: 246381
URL: http://svnweb.freebsd.org/changeset/base/246381
Log:
Fix RLIMIT_NOFILE for OS X.
Modified:
projects/cider/usr.bin/make/main.c
Modified: projects/cider/usr.bin/make/main.c
==============================================================================
--- projects/cider/usr.bin/make/main.c Wed Feb 6 04:36:57 2013 (r246380)
+++ projects/cider/usr.bin/make/main.c Wed Feb 6 04:37:53 2013 (r246381)
@@ -933,7 +933,11 @@ main(int argc, char **argv)
if (getrlimit(RLIMIT_NOFILE, &rl) == -1) {
err(2, "getrlimit");
}
+#ifdef __APPLE__
+ rl.rlim_cur = OPEN_MAX < rl.rlim_max ? OPEN_MAX : rl.rlim_max;
+#else
rl.rlim_cur = rl.rlim_max;
+#endif
if (setrlimit(RLIMIT_NOFILE, &rl) == -1) {
err(2, "setrlimit");
}
More information about the svn-src-projects
mailing list