Better way to kill CamlinternalOO
authorrjones <rjones>
Wed, 13 Feb 2008 17:35:32 +0000 (17:35 +0000)
committerrjones <rjones>
Wed, 13 Feb 2008 17:35:32 +0000 (17:35 +0000)
init
init.in
ocamlbotwrapper.c
xavierbot.pl

diff --git a/init b/init
index d6a0d92..a87e3fd 100644 (file)
--- a/init
+++ b/init
@@ -1,5 +1,5 @@
 (* Initialise the toplevel environment. -*- tuareg -*-
- * $Id: init,v 1.10 2008/02/13 17:17:31 rjones Exp $
+ * $Id: init,v 1.11 2008/02/13 17:35:32 rjones Exp $
  * - Removes the Pervasives module and any dangerous functions.
  * - Loads just the modules we want to give access to, and just
  *   the functions within those modules that we want to give.
diff --git a/init.in b/init.in
index 68dafc5..972b8d5 100644 (file)
--- a/init.in
+++ b/init.in
@@ -1,5 +1,5 @@
 (* Initialise the toplevel environment. -*- tuareg -*-
- * $Id: init.in,v 1.7 2008/02/13 17:17:31 rjones Exp $
+ * $Id: init.in,v 1.8 2008/02/13 17:35:32 rjones Exp $
  * - Removes the Pervasives module and any dangerous functions.
  * - Loads just the modules we want to give access to, and just
  *   the functions within those modules that we want to give.
@@ -194,12 +194,11 @@ end = struct include Scanf end
 module StringSet = Set.Make(String)
 module StringMap = Map.Make(String)
 
-(* Create an object, so we get the CamlinternalOO module. *)
+(* Create an object, so we get the CamlinternalOO module ... *)
 let _ = object end
 
 (* ... but prevent public access to CamlinternalOO. *)
-module CamlinternalOO : sig
-end = struct end
+module CamlinternalOO = struct end
 
 #load "camlp4o.cma";;
 #load "./pa_noexternal.cmo";;
index 266bb17..27c334f 100644 (file)
@@ -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.
  */
 
@@ -67,10 +67,7 @@ main ()
   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
index 393c0eb..d1c63f5 100755 (executable)
@@ -2,7 +2,7 @@
 # xavierbot : an OCaml interpreter IRC bot.
 # By Richard W.M. Jones <rich@annexia.org>.
 # This code is in the Public Domain.
-# $Id: xavierbot.pl,v 1.12 2008/01/23 15:44:46 rjones Exp $
+# $Id: xavierbot.pl,v 1.13 2008/02/13 17:35:32 rjones Exp $
 
 use strict;
 use POE qw(Component::IRC Wheel::Run);
@@ -108,7 +108,7 @@ sub irc_public
     if ($what =~ /^\s*xavierbot\b.*\bhelp\b/) {
        my $nick = (split /!/, $who)[0];
        $kernel->post ($sender => privmsg => $channel =>
-           "hello $nick, I am xavierbot 0.7, an OCaml toplevel");
+           "hello $nick, I am xavierbot 0.8, an OCaml toplevel");
        $kernel->post ($sender => privmsg => $channel => $_)
            foreach (@usage);
     }