What is the best way to run an executable with execution-time and memory(RAM) limit (e.g. 2.5 seconds and 32768 kB)?
I need to get the exit-code if it exits without violating time and memory limits. Otherwise it should be killed and I need to know which limit it violated (e.g. MEMORY_LIMIT_EXCEEDED
, TIME_LIMIT_EXCEEDED
).