java 不再使用沙箱
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user