portage.util._async.run_main_scheduler module

portage.util._async.run_main_scheduler.run_main_scheduler(scheduler)

Start and run an AsyncScheduler (or compatible object), and handle SIGINT or SIGTERM by calling its terminate() method and waiting for it to clean up after itself. If SIGINT or SIGTERM is received, return signum, else return None. Any previous SIGINT or SIGTERM signal handlers are automatically saved and restored before returning.