In the site Ideone a user uploads code to be run on a remote server. This is similar to the functions of an online judge.
The problem is that users might upload code that attempts to 'hack' the system. I understand that in C and C++ it's easy to disable a certain set of system calls (patch a few .dll's), but I'm not so sure about other languages.
How would you protect your system if you were to support higher level languages (Erlang, Haskell) on the online judge?