MCPcopy Create free account
hub / github.com/PRIME-RL/PRIME / signal_handler

Method signal_handler

eval/utils/python_interpreter.py:87–88  ·  view source on GitHub ↗
(signum, frame)

Source from the content-addressed store, hash-verified

85 @contextmanager
86 def time_limit(self, seconds):
87 def signal_handler(signum, frame):
88 raise TimeoutError(f"Timed out after {seconds} seconds.")
89
90 signal.signal(signal.SIGALRM, signal_handler)
91 signal.alarm(seconds)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected