summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorkensmith <kensmith@FreeBSD.org>2007-12-28 05:08:54 +0000
committerkensmith <kensmith@FreeBSD.org>2007-12-28 05:08:54 +0000
commitc9054ae803ccb0b5c30333ca4d58280dffdaf79c (patch)
treefd0e87721c98f997238aa06b152c14900536c8b3 /usr.sbin
parent93c7f7517b23fa331c2cf528a23708bee7444da1 (diff)
downloadFreeBSD-src-c9054ae803ccb0b5c30333ca4d58280dffdaf79c.zip
FreeBSD-src-c9054ae803ccb0b5c30333ca4d58280dffdaf79c.tar.gz
The limit on datasize in the install environment is 128M. That's a bit
too small for today's standards. While loading packages sysinstall blows past this by a LOT but I think (hope...) that's caused by other bugs. I'll look more into why sysinstall's memory use has gotten so out of control as it loads packages but independent of that there really is no reason to leave the limits on datasize and stacksize in place. And they can cause problems for some of the things "modern packages" might be doing via pkg_add which gets run by sysinstall and would inherit the limits. Another insta-MFC probably coming, this is holding up 6.3-RC2. Sysinstall's memory use is so out of control it blows past the current limit before it finishes loading either of the meta-packages kde or gnome...
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sysinstall/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr.sbin/sysinstall/main.c b/usr.sbin/sysinstall/main.c
index 149a0dc..bc6e1d9 100644
--- a/usr.sbin/sysinstall/main.c
+++ b/usr.sbin/sysinstall/main.c
@@ -37,6 +37,8 @@
#include "sysinstall.h"
#include <sys/signal.h>
#include <sys/fcntl.h>
+#include <sys/time.h>
+#include <sys/resource.h>
const char *StartName; /* Initial contents of argv[0] */
@@ -52,6 +54,7 @@ main(int argc, char **argv)
{
int choice, scroll, curr, max, status;
char titlestr[80], *arch, *osrel, *ostype;
+ struct rlimit rlim;
/* Record name to be able to restart */
StartName = argv[0];
@@ -69,6 +72,13 @@ main(int argc, char **argv)
return 1;
}
+ /* If installing packages we'll grow a LOT. */
+ rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY;
+ if (setrlimit(RLIMIT_DATA, &rlim) != 0)
+ fprintf(stderr, "Warning: setrlimit() failed.\n");
+ if (setrlimit(RLIMIT_STACK, &rlim) != 0)
+ fprintf(stderr, "Warning: setrlimit() failed.\n");
+
#ifdef PC98
{
/* XXX */
OpenPOWER on IntegriCloud