Ещё фиксы от ИИ
All checks were successful
Build and Push Docker Images / build (src/LiquidCode.Tester.Gateway/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-gateway-roman, gateway) (push) Successful in 57s
Build and Push Docker Images / build (src/LiquidCode.Tester.Worker/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-worker-roman, worker) (push) Successful in 1m17s
All checks were successful
Build and Push Docker Images / build (src/LiquidCode.Tester.Gateway/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-gateway-roman, gateway) (push) Successful in 57s
Build and Push Docker Images / build (src/LiquidCode.Tester.Worker/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-worker-roman, worker) (push) Successful in 1m17s
This commit is contained in:
@@ -61,8 +61,15 @@ public class CSharpExecutionServiceIsolate : IExecutionService
|
||||
});
|
||||
chmodProcess?.WaitForExit();
|
||||
|
||||
// Prepare output file in box
|
||||
// Prepare input/output files inside the sandbox
|
||||
var outputFilePath = Path.Combine(boxDir, "output.txt");
|
||||
string? sandboxInputPath = null;
|
||||
|
||||
if (!string.IsNullOrEmpty(inputFilePath) && File.Exists(inputFilePath))
|
||||
{
|
||||
sandboxInputPath = Path.Combine(boxDir, "input.txt");
|
||||
File.Copy(inputFilePath, sandboxInputPath, overwrite: true);
|
||||
}
|
||||
|
||||
// Run in Isolate
|
||||
var isolateResult = await _isolateService.RunAsync(new IsolateRunOptions
|
||||
@@ -75,7 +82,7 @@ public class CSharpExecutionServiceIsolate : IExecutionService
|
||||
StackLimitKb = 256 * 1024,
|
||||
ProcessLimit = 1, // Single process for C#
|
||||
EnableNetwork = false,
|
||||
StdinFile = inputFilePath,
|
||||
StdinFile = sandboxInputPath,
|
||||
StdoutFile = outputFilePath,
|
||||
WorkingDirectory = "/box"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user