I am implementing a validation system in Ruby. It runs executable files with various tests. If the solution is not correct, it may require endless completion with certain stringent tests. So I want to limit the runtime to 5 seconds.
I use the system () function to run executable files:
system("./solution");
.NET has an excellent WaitForExit() method, what about Ruby ?.
Is there a way to limit the runtime of an external process to 5 seconds?
thanks
ruby process execution-time
Alex
source share