X-Git-Url: http://git.annexia.org/?p=xavierbot.git;a=blobdiff_plain;f=ocamlbotwrapper.c;h=87931349aa6d5eea9a66a1a34f72253c787b548a;hp=266bb1707b65f00ae7cb5d7e4d1c5469db0ab54c;hb=HEAD;hpb=62c2a700f26885ebc8462788f524547a018d56fc diff --git a/ocamlbotwrapper.c b/ocamlbotwrapper.c index 266bb17..8793134 100644 --- a/ocamlbotwrapper.c +++ b/ocamlbotwrapper.c @@ -1,5 +1,5 @@ /* -*- C -*- - * $Id: ocamlbotwrapper.c,v 1.7 2008/01/23 15:44:46 rjones Exp $ + * $Id: ocamlbotwrapper.c,v 1.8 2008/02/13 17:35:32 rjones Exp $ * SUID wrapper around ocaml program. */ @@ -43,7 +43,7 @@ main () /* Set some limits. */ #ifdef RLIMIT_AS - lim.rlim_cur = lim.rlim_max = 32 * 1024 * 1024; /* bytes!?! */ + lim.rlim_cur = lim.rlim_max = 256 * 1024 * 1024; /* bytes!?! */ setrlimit (RLIMIT_AS, &lim); #endif #ifdef RLIMIT_CORE @@ -51,7 +51,7 @@ main () setrlimit (RLIMIT_CORE, &lim); #endif #ifdef RLIMIT_CPU - lim.rlim_cur = lim.rlim_max = 10; /* seconds */ + lim.rlim_cur = lim.rlim_max = 60; /* seconds */ setrlimit (RLIMIT_CPU, &lim); #endif #ifdef RLIMIT_MEMLOCK @@ -63,14 +63,11 @@ main () setrlimit (RLIMIT_MSGQUEUE, &lim); #endif #ifdef RLIMIT_NOFILE - lim.rlim_cur = lim.rlim_max = 10; + lim.rlim_cur = lim.rlim_max = 32; setrlimit (RLIMIT_NOFILE, &lim); #endif #ifdef RLIMIT_NPROC - /* If you want to run several instances of xavierbot, you may need - * to increase this limit. - */ - lim.rlim_cur = lim.rlim_max = 4; + lim.rlim_cur = lim.rlim_max = 2; setrlimit (RLIMIT_NPROC, &lim); #endif #ifdef RLIMIT_SIGPENDING @@ -78,7 +75,7 @@ main () setrlimit (RLIMIT_SIGPENDING, &lim); #endif #ifdef RLIMIT_STACK - lim.rlim_cur = lim.rlim_max = 8 * 1024 * 1024; /* bytes */ + lim.rlim_cur = lim.rlim_max = 32 * 1024 * 1024; /* bytes */ setrlimit (RLIMIT_STACK, &lim); #endif