diff --git a/packages/hydrojudge/package.json b/packages/hydrojudge/package.json index 461d0eb3a..eb0b97610 100644 --- a/packages/hydrojudge/package.json +++ b/packages/hydrojudge/package.json @@ -1,7 +1,7 @@ { "name": "@hydrooj/hydrojudge", "bin": "bin/hydrojudge.js", - "version": "2.8.7", + "version": "2.8.8", "main": "package.json", "author": "undefined ", "repository": "https://github.com/hydro-dev/Hydro.git", diff --git a/packages/hydrojudge/src/judge/interactive.ts b/packages/hydrojudge/src/judge/interactive.ts index 770be327a..42f31b0ad 100644 --- a/packages/hydrojudge/src/judge/interactive.ts +++ b/packages/hydrojudge/src/judge/interactive.ts @@ -26,7 +26,7 @@ function judgeCase(c) { time: ctxSubtask.subtask.time, memory: ctxSubtask.subtask.memory, }, { - execute: `${ctx.executeInteractor.execute.replace(/\$\{name\}/g, 'interactor')} /w/in /w/tout /w/tout`, + execute: `${ctx.executeInteractor.execute.replace(/\$\{name\}/g, 'interactor')} /w/in /w/tout /w/out`, copyIn: ctx.executeInteractor.copyIn, time: ctxSubtask.subtask.time * 2, memory: ctxSubtask.subtask.memory * 2, diff --git a/packages/hydrojudge/src/sandbox.ts b/packages/hydrojudge/src/sandbox.ts index fe8d7f7d7..dad31fc55 100644 --- a/packages/hydrojudge/src/sandbox.ts +++ b/packages/hydrojudge/src/sandbox.ts @@ -76,6 +76,7 @@ async function adaptResult(result, params) { export async function runMultiple(execute) { let res; + const size = parseMemoryMB(getConfig('stdio_size')); try { const body = { cmd: [ @@ -85,9 +86,15 @@ export async function runMultiple(execute) { pipeMapping: [{ in: { index: 0, fd: 1 }, out: { index: 1, fd: 0 }, + proxy: true, + name: 'stdout', + max: 1024 * 1024 * size, }, { in: { index: 1, fd: 1 }, out: { index: 0, fd: 0 }, + proxy: true, + name: 'stdout', + max: 1024 * 1024 * size, }], }; body.cmd[0].files[0] = null; @@ -105,7 +112,7 @@ export async function runMultiple(execute) { return await Promise.all(res.data.map((i) => adaptResult(i, {}))); } -export async function del(fileId) { +export async function del(fileId: string) { const res = await Axios.create({ baseURL: getConfig('sandbox_host') }).delete(`/file/${fileId}`); return res.data; }