pass io mode to judge server
This commit is contained in:
@@ -146,7 +146,8 @@ class JudgeDispatcher(DispatcherBase):
|
|||||||
"spj_version": self.problem.spj_version,
|
"spj_version": self.problem.spj_version,
|
||||||
"spj_config": spj_config.get("config"),
|
"spj_config": spj_config.get("config"),
|
||||||
"spj_compile_config": spj_config.get("compile"),
|
"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:
|
with ChooseJudgeServer() as server:
|
||||||
|
|||||||
@@ -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"]
|
default_env = ["LANG=en_US.UTF-8", "LANGUAGE=en_US:en", "LC_ALL=en_US.UTF-8"]
|
||||||
|
|
||||||
_c_lang_config = {
|
_c_lang_config = {
|
||||||
@@ -28,7 +31,7 @@ int main() {
|
|||||||
},
|
},
|
||||||
"run": {
|
"run": {
|
||||||
"command": "{exe_path}",
|
"command": "{exe_path}",
|
||||||
"seccomp_rule": "c_cpp",
|
"seccomp_rule": {ProblemIOMode.standard: "c_cpp", ProblemIOMode.file: "c_cpp_file_io"},
|
||||||
"env": default_env
|
"env": default_env
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user