S2OJ/judger/uoj_judger/main_judger.cpp
Baoshuo bcf5ce8b06
All checks were successful
continuous-integration/drone/push Build is passing
feat(judger): uoj_judger_v2
ref: https://github-redirect.dependabot.com/UniversalOJ/UOJ-System/pull/113

Co-authored-by: vfleaking <vfleaking@163.com>
Co-authored-by: Yefori-Go <110314400+Yefori-Go@users.noreply.github.com>
2022-10-04 20:57:49 +08:00

21 lines
609 B
C++

#include "uoj_judger_v2.h"
int main(int argc, char **argv) {
main_judger_init(argc, argv);
runp::config rpc(conf_str("judger"), {
main_path, work_path, result_path, data_path
});
rpc.result_file_name = result_path / "run_judger_result.txt";
rpc.input_file_name = "/dev/null";
rpc.output_file_name = "/dev/null";
rpc.error_file_name = "stderr";
rpc.limits = conf_run_limit("judger", 0, RL_JUDGER_DEFAULT);
rpc.unsafe = true;
runp::result res = runp::run(rpc);
if (res.type != runp::RS_AC) {
end_judge_judgment_failed("Judgment Failed : Judger " + runp::rstype_str(res.type));
}
return 0;
}