summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Smith <kensmith@FreeBSD.org>2007-12-29 06:21:59 +0000
committerKen Smith <kensmith@FreeBSD.org>2007-12-29 06:21:59 +0000
commit292c474cc57a75ee37c966298859fc33a9337fcf (patch)
tree7b67d431b83c675a9cc8ea28dc273a5ece949556
parent04a6d14346f231a86d7edb3852b5f5f3453e3833 (diff)
Notes
-rw-r--r--usr.sbin/sysinstall/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/usr.sbin/sysinstall/main.c b/usr.sbin/sysinstall/main.c
index beb6567db819..5bb24689aebd 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,20 @@ main(int argc, char **argv)
return 1;
}
+ /*
+ * Given what it does sysinstall (and stuff sysinstall runs like
+ * pkg_add) shouldn't be subject to process limits. Better to just
+ * let them have what they think they need than have them blow
+ * their brains out during an install (in sometimes strange and
+ * mysterious ways).
+ */
+
+ rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY;
+ if (setrlimit(RLIMIT_DATA, &rlim) != 0)
+ fprintf(stderr, "Warning: setrlimit() of datasize failed.\n");
+ if (setrlimit(RLIMIT_STACK, &rlim) != 0)
+ fprintf(stderr, "Warning: setrlimit() of stacksize failed.\n");
+
#ifdef PC98
{
/* XXX */