Skip to content
sunner edited this page Mar 18, 2011 · 8 revisions

If you have any question, just edit the page and leave question here. We will answer it later.

Why restricted function?

To protect your server, sandbox allows only a limited number of system calls to be called in submissions. Normally, the program, which read data from stdin, process data in CPU, and write results to stdout, can not get this error. If your program matchs the situation but get this error, run the following commands in shell:

uname -a
gcc -v
cd /path/to/moodle/mod/assignment/type/onlinejudge/
cd sandbox
make test
cd ..
./languages/c.sh yourprog.c a.out  # use ./languages/cpp.sh for C++ code
./sandbox/sand a.out
echo $?
strace ./a.out 

Send youprog.c, a.out and the output of all the above commands to sunner@gmail.com

Why pending forever?

  1. Check whether the judge daemon is running. The process's name should be php or php.exe
  2. If the daemon quits by itself, check your PHP log (default to syslog or Windows NT events log) for detail error messages.

What the difference between sandbox and ideone.com?

OJ currently supports two kinds of judge engine: sandbox and ideone.com. The following table describes the difference.

Judge Supported OSes Internet Speed Languages Limits Safe
sandbox Linux only Not required Depends on your server load. Normally faster than ideone.com C/C++ only No Yes, but it depends on the sandbox
ideone.com Linux & Windows Required Depends on the internet conection and ideone.com's load. 40+ 1000 submissions/month Sure, no submissions will be executed on your server

What the difference between Linux and Windows for OJ

Since the developers are using Linux, OJ supports Linux better. We did only a few testings under Windows.

And, Windows doesn't support all the features we provide.