java 不再使用沙箱

This commit is contained in:
virusdefender
2016-02-02 10:23:23 +08:00
parent 8dcd36b3d9
commit 6963b2879b
2 changed files with 7 additions and 4 deletions

View File

@@ -91,7 +91,7 @@ class JudgeClient(object):
out_file=os.path.join(self._judge_base_path, str(test_case_id) + ".out"),
args=execute_command[1:],
env=["PATH=" + os.environ["PATH"]],
use_sandbox=True)
use_sandbox=self._language["use_sandbox"])
if run_result["flag"] == 0:
output_md5, r = self._compare_output(test_case_id)
if r:

View File

@@ -7,21 +7,24 @@ languages = {
"src_name": "main.c",
"code": 1,
"compile_command": "/usr/bin/gcc -DONLINE_JUDGE -O2 -w -std=c99 {src_path} -lm -o {exe_path}/main",
"execute_command": "{exe_path}/main"
"execute_command": "{exe_path}/main",
"use_sandbox": True
},
2: {
"name": "cpp",
"src_name": "main.cpp",
"code": 2,
"compile_command": "/usr/bin/g++ -DONLINE_JUDGE -O2 -w -std=c++11 {src_path} -lm -o {exe_path}/main",
"execute_command": "{exe_path}/main"
"execute_command": "{exe_path}/main",
"use_sandbox": True
},
3: {
"name": "java",
"src_name": "Main.java",
"code": 3,
"compile_command": "/usr/bin/javac {src_path} -d {exe_path}",
"execute_command": "/usr/bin/java -cp {exe_path} -Djava.security.manager -Djava.security.policy==policy Main"
"execute_command": "/usr/bin/java -cp {exe_path} -Djava.security.manager -Djava.security.policy==policy Main",
"use_sandbox": False
}
}