Skip to content

Commit 82f4391

Browse files
fix TLE
1 parent d0bc416 commit 82f4391

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/execute.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ pub fn execute(payload: ExecuteRequest) -> Result<ExecuteResponse> {
154154
let command_output = run_command("./run", tmp_dir.path(), command_options)?;
155155

156156
let verdict = match command_output.exit_code {
157-
124 => Verdict::TimeLimitExceeded,
157+
// timeout exits with status 124. command_output.exit_code is a wait status.
158+
// exit status 124 corresponds to wait status (124 << 8).
159+
31744 => Verdict::TimeLimitExceeded,
158160
0 => Verdict::Accepted,
159161
_ => Verdict::RuntimeError,
160162
};

0 commit comments

Comments
 (0)