From 0787243c554cc424a137ae7e7ef4ea4efe5c1e70 Mon Sep 17 00:00:00 2001 From: virusdefender Date: Sun, 25 Sep 2016 15:06:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8F=82=E6=95=B0=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- judge_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/judge_client.py b/judge_client.py index b6eccc8..b7dbf05 100644 --- a/judge_client.py +++ b/judge_client.py @@ -45,19 +45,19 @@ class JudgeClient(object): in_file = os.path.join(self._test_case_dir, str(test_case_file_id) + ".in") out_file = os.path.join(self._test_case_dir, str(test_case_file_id) + ".out") - command = self._run_config["command"].format(exe_path=self._exe_path, max_memory=self._max_memory) + command = self._run_config["command"].format(exe_path=self._exe_path, max_memory=self._max_memory).split(" ") run_result = _judger.run(max_cpu_time=self._max_cpu_time, max_real_time=self._max_real_time, max_memory=self._max_memory, max_output_size=1024 * 1024 * 1024, max_process_number=5, - exe_path=command[0], + exe_path=command[0].encode("utf-8"), input_path=in_file, output_path=out_file, error_path=out_file, args=[item.encode("utf-8") for item in command[1::]], - env=[("PATH" + os.getenv("PATH")).encode("utf-8")], + env=[("PATH=" + os.getenv("PATH")).encode("utf-8")], log_path=JUDGER_RUN_LOG_PATH, seccomp_rule_so_path=self._seccomp_rule_path(self._run_config["seccomp_rule"]), uid=LOW_PRIVILEDGE_UID,