mirror of
https://github.com/QingdaoU/Judger.git
synced 2024-12-27 15:31:41 +00:00
fix some typo
This commit is contained in:
parent
95c18f41a7
commit
8e5b45adea
37
LICENSE
Normal file
37
LICENSE
Normal file
@ -0,0 +1,37 @@
|
||||
The Star And Thank Author License (SATA)
|
||||
|
||||
Copyright (c) <Qingdao University Online Judge Dev Team> <info@qduoj.com>
|
||||
|
||||
Project Url: https://github.com/QingdaoU/OnlineJudge
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
And wait, the most important, you shall star/+1/like the project(s) in project url
|
||||
section above first, and then thank the author(s) in Copyright section.
|
||||
|
||||
Here are some suggested ways:
|
||||
|
||||
- Email the authors a thank-you letter, and make friends with him/her/them.
|
||||
- Report bugs or issues.
|
||||
- Tell friends what a wonderful project this is.
|
||||
- And, sure, you can just express thanks in your mind without telling the world.
|
||||
|
||||
Contributors of this project by forking have the option to add his/her name and
|
||||
forked project url at copyright and project url sections, but shall not delete
|
||||
or modify anything else in these two sections.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
@ -9,12 +9,12 @@ sudo apt-get install libseccomp-dev
|
||||
mkdir build && cd build && cmake .. && make && sudo make install
|
||||
```
|
||||
|
||||
|
||||
## C API
|
||||
|
||||
`#include <runner.h>` then call `run` function with `struct config` and `struct result` pointer.
|
||||
|
||||
## `struct config` members
|
||||
|
||||
- `max_cpu_time`(ms): max cpu time this process can cost, -1 for unlimited
|
||||
- `max_real_time`(ms): max time this process can run, -1 for unlimited
|
||||
- `max_memory`(byte): max size of the process's virtual memory (address space), -1 for unlimited
|
||||
@ -85,7 +85,7 @@ cd tests && sudo python test.py
|
||||
- Linux x64 and kernel version > 3.17 required
|
||||
- Judger security relies on Docker with default security config [More](todo)
|
||||
- Tested under Ubuntu 14.04 docker container. System calls may vary due to different system and kernel versions
|
||||
- Root user required to run judger
|
||||
- Root user required to change uid / gid
|
||||
- Why use seccomp instead of ptrace? Ptrace can decrease process's performance significantly, for each system call, twice
|
||||
context switch between child process and parent process is needed.
|
||||
- How to custom seccomp rule? [Example here]() and then reinstall jduger, your code will be compiled and installed under
|
||||
|
@ -102,8 +102,8 @@ static PyObject *judger_run(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
|
||||
|
||||
static PyMethodDef judger_methods[] = {
|
||||
{"run", (PyCFunction) judger_run, METH_KEYWORDS, NULL},
|
||||
{NULL, NULL, 0, NULL}
|
||||
{"run", (PyCFunction) judger_run, METH_KEYWORDS, NULL},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user