Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行demo时,result=4,请问大佬有解决办法么? #58

Open
momomom123 opened this issue May 10, 2021 · 2 comments
Open

运行demo时,result=4,请问大佬有解决办法么? #58

momomom123 opened this issue May 10, 2021 · 2 comments

Comments

@momomom123
Copy link

No description provided.

@bloodnighttw
Copy link

bloodnighttw commented Feb 18, 2022

似乎是沒解決
圖片

已經使用gcc 或 g++編譯過
目前除了把 seccomp_rule_name="c_cpp"改成seccomp_rule_name=None外
我都無法解決
另外 這是我的main.c

#include <stdio.h>
int main(){
        printf("aaa");
}

另外 這是我的tt.py

import _judger

a = _judger.run(max_cpu_time=1000,
    max_real_time=2000,
    max_memory=128 * 1024 * 1024,
    max_process_number=200,
    max_output_size=10000,
    max_stack=32 * 1024 * 1024,
    # five args above can be _judger.UNLIMITED
    exe_path="/home/bloodnighttw/git/Judger/tests/a.out",
    input_path="a.out",
    output_path="echo.out",
    error_path="echo.out",
    # can be empty list
    args=["HelloWorld"],
    # can be empty list
    env=["foo=bar"],
    log_path="judger.log",
   # can be None
    seccomp_rule_name="c_cpp",
    uid=0,
    gid=0)


print(str(a))

@Ma1oneZhang
Copy link

I got same result, but I got correct result in java Runtime.exec() (running shell in java) when i do not use the argument seccomp_rule_name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants