ioi/isolate

open("/tmp/sandboxes/421/box/compile.output"): No such file or directory

Closed this issue · 1 comments

I tried this on an Ubuntu 18.04 VPS, and then on that machine but in Docker, still get the same error

isolate -b 421 --mem 128000 --time 2 -p -E PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -o /tmp/sandboxes/421/box/compile.output --stderr-to-stdout -M /tmp/sandboxes/421/box/compile.meta --run -- /usr/bin/g++ -Wfatal-errors -o source source.cpp
open("/tmp/sandboxes/421/box/compile.output"): No such file or directory

The box had been successfully initialized, and the /tmp/sandboxes/421/box/compile.meta had been generated, but only the -o file hadn't been created and throw this error.

From the -o definition.

Redirect standard output to file. The file has to be accessible inside the sandbox (which means that the sandboxed program can manipulate it arbitrarily). If not specified, standard output is inherited from the parent process and the sandbox manager does not write anything to it.

So you should generate compile.output in the sandbox first.