diff --git a/usr.sbin/sysinstall/main.c b/usr.sbin/sysinstall/main.c index 149a0dc4256e..bc6e1d92f160 100644 --- a/usr.sbin/sysinstall/main.c +++ b/usr.sbin/sysinstall/main.c @@ -37,6 +37,8 @@ #include "sysinstall.h" #include #include +#include +#include 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 */