I am now trying to run python codes from user input in a .netcore project on Linux(Debian). However, something like a dead loop may use up too much resource. I wonder if I can abort oprations that cost too much time.
I want to set a timeout or kill a script when it is running for too long. (Maybe I could use a timer and kill the script when it runs for too long as a workaround.)