Closed seanmakesgames closed 10 months ago
The following code soft-locks ruby. I have to kill -9 it to get it to stop. Timeout works fine when I run it inside of eval().
ctx = V8::Context.new({timeout: timeout_seconds*1000}) ctx[:db] = DatabaseConnection.new Timeout::timeout(timeout_seconds) { ctx.eval(code_to_execute) // includes while(true); inside of SCRIPTCALL_TOP_LEVEL result["retval"] = ctx[:SCRIPTCALL_TOP_LEVEL].call( { :caller => @current_user.name, :calling_script => nil, :this_script => params["script_name"] }, RunProcessor.process_args(params["args"]) ) }
The following code soft-locks ruby. I have to kill -9 it to get it to stop. Timeout works fine when I run it inside of eval().