summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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