zakariamaaraki / RemoteCodeCompiler

An online code compiler supporting 11 programming languages (Java, Kotlin, Scala, C, C++, C#, Golang, Python, Ruby, Rust and Haskell) for competitive programming and coding interviews.
GNU General Public License v3.0
151 stars 50 forks source link

setting memory and time limit #3

Closed aldwnesx closed 2 years ago

aldwnesx commented 3 years ago

!/usr/bin/env bash

ulimit -s 5 timeout --signal=SIGTERM 5 python3 test.py exit $?

the above code doesn't seem to stop the python script. I tried with an infinite loop code in test.py

zakariamaaraki commented 2 years ago

this script is working for me with an infinite loop, can you provide your test.py file please ?

zakariamaaraki commented 2 years ago

Hello, fixed ! Now we destroy the container if it gets stuck for some reason after a timeout.