How to limit the computing resources of the program?

I want to implement an online judge system on Linux using python. I need to limit the computational resource (time, memory) for the process. A process should end when it uses more resources than indicated.

Also, when a program terminates, I need to know if it ends normally or terminates due to a runtime error (stack over a thread, division by zero, access to an invalid address) or using a larger resource than indicated.

How to do this in python?

+3
source share
3 answers
0

github "safeexec", . , .

0

All Articles