On 23 Sep., 15:33, John Harrop <jharrop...@gmail.com> wrote: > On Wed, Sep 23, 2009 at 8:50 AM, Philipp Meier <phme...@gmail.com> wrote: > > Remember that clojure runs in the JVM and a JVM can have a > > SecurityManager which can be configured to allow or deny at most any > > dangeroues operatÃon. A java policy file will to the trick, I think. > > That plausibly helps against malicious I/O and changing the JVM settings > (System.setProperty() etc.) but I don't see it doing much about a simple > memory-and/or-CPU-exhaustion loop.
You're right. For threads not hanging you could monitor the execution time of a evaluation thread and suspend a hangung thread using the java debugger interface (http://java.sun.com/j2se/1.5.0/docs/guide/ jpda/jdi/). Perhaps VisualVM can throw in some technology to monitor actual runtime of the thread and and memory consumption. However this is a rather fragile topic for java. Spawning some additional jvms will probably do better. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---