MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/openevolve / signal_handler

Method signal_handler

openevolve/controller.py:339–350  ·  view source on GitHub ↗
(signum, frame)

Source from the content-addressed store, hash-verified

337
338 # Set up signal handlers for graceful shutdown
339 def signal_handler(signum, frame):
340 logger.info(f"Received signal {signum}, initiating graceful shutdown...")
341 self.parallel_controller.request_shutdown()
342
343 # Set up a secondary handler for immediate exit if user presses Ctrl+C again
344 def force_exit_handler(signum, frame):
345 logger.info("Force exit requested - terminating immediately")
346 import sys
347
348 sys.exit(0)
349
350 signal.signal(signal.SIGINT, force_exit_handler)
351
352 signal.signal(signal.SIGINT, signal_handler)
353 signal.signal(signal.SIGTERM, signal_handler)

Callers

nothing calls this directly

Calls 1

request_shutdownMethod · 0.80

Tested by

no test coverage detected