Remove hardlink in judger plugins
Eason0729 opened this issue · 0 comments
Eason0729 commented
Judger plugin(or language support) is just a tarball with extension(
.lang
)
We should remove all hardlink in official plugin, so judger won't emit warning to confuse user.
State of art on plugin packaging
When we package official plugin, we use docker export
to export a unix-like filesystem in tarball.
There are three type of entry in tarball:
- regular file
- symlink: mapped to filesystem in tarball
- hardlink: should not be mapped to outside world
In current implementation, hardlink would cause judger to emit warning(because hardlink won't be mapped), and accessing it would cause KMEM error.
In addition, docker export
treat common device as hardlink, including /dev/null
, /dev/random
, and our implementation provide such device, so it normally safe to remove.