pass io mode to judge server

This commit is contained in:
virusdefender 2019-03-13 17:57:59 +08:00
parent 8cdc4acaaf
commit b963f2d5bc
2 changed files with 6 additions and 2 deletions

View File

@ -146,7 +146,8 @@ class JudgeDispatcher(DispatcherBase):
"spj_version": self.problem.spj_version,
"spj_config": spj_config.get("config"),
"spj_compile_config": spj_config.get("compile"),
"spj_src": self.problem.spj_code
"spj_src": self.problem.spj_code,
"io_mode": self.problem.io_mode
}
with ChooseJudgeServer() as server:

View File

@ -1,3 +1,6 @@
from problem.models import ProblemIOMode
default_env = ["LANG=en_US.UTF-8", "LANGUAGE=en_US:en", "LC_ALL=en_US.UTF-8"]
_c_lang_config = {
@ -28,7 +31,7 @@ int main() {
},
"run": {
"command": "{exe_path}",
"seccomp_rule": "c_cpp",
"seccomp_rule": {ProblemIOMode.standard: "c_cpp", ProblemIOMode.file: "c_cpp_file_io"},
"env": default_env
}
}