X-Git-Url: http://git.annexia.org/?p=xavierbot.git;a=blobdiff_plain;f=ocamlbotwrapper.c;h=266bb1707b65f00ae7cb5d7e4d1c5469db0ab54c;hp=c852850332aa26dba489a9f97bf2a7fd0f5b5601;hb=2b6a98ffb4f27938326bfae6eb1521e2d7d22d58;hpb=5e6674263be334ebb33bfda3412b5c3682968d85 diff --git a/ocamlbotwrapper.c b/ocamlbotwrapper.c index c852850..266bb17 100644 --- a/ocamlbotwrapper.c +++ b/ocamlbotwrapper.c @@ -1,5 +1,5 @@ /* -*- C -*- - * $Id: ocamlbotwrapper.c,v 1.4 2007/06/29 07:55:47 rjones Exp $ + * $Id: ocamlbotwrapper.c,v 1.7 2008/01/23 15:44:46 rjones Exp $ * SUID wrapper around ocaml program. */ @@ -51,7 +51,7 @@ main () setrlimit (RLIMIT_CORE, &lim); #endif #ifdef RLIMIT_CPU - lim.rlim_cur = lim.rlim_max = 60; /* seconds */ + lim.rlim_cur = lim.rlim_max = 10; /* seconds */ setrlimit (RLIMIT_CPU, &lim); #endif #ifdef RLIMIT_MEMLOCK @@ -67,7 +67,10 @@ main () setrlimit (RLIMIT_NOFILE, &lim); #endif #ifdef RLIMIT_NPROC - lim.rlim_cur = lim.rlim_max = 2; + /* If you want to run several instances of xavierbot, you may need + * to increase this limit. + */ + lim.rlim_cur = lim.rlim_max = 4; setrlimit (RLIMIT_NPROC, &lim); #endif #ifdef RLIMIT_SIGPENDING