<s> import signal <EOL> import sys <EOL> import ufora . config . Mainline as Mainline <EOL> import ufora . test . ClusterSimulation as ClusterSimulation <EOL> def main ( args ) : <EOL> print "<STR_LIT>" <EOL> simulator = ClusterSimulation . Simulator . createGlobalSimulator ( ) <EOL> simulator . startService ( ) <EOL> simulator . desirePublisher . desireNumberOfWorkers ( <NUM_LIT:1> ) <EOL> def signal_handler ( sig , _ ) : <EOL> signal_name = '<STR_LIT>' <EOL> if sig == signal . SIGINT : <EOL> signal_name = '<STR_LIT>' <EOL> elif sig == signal . SIGTERM : <EOL> signal_name = '<STR_LIT>' <EOL> print '<STR_LIT>' , signal_name , '<STR_LIT>' <EOL> simulator . stopService ( ) <EOL> sys . exit ( <NUM_LIT:0> ) <EOL> signal . signal ( signal . SIGINT , signal_handler ) <EOL> signal . signal ( signal . SIGTERM , signal_handler ) <EOL> print "<STR_LIT>" <EOL> signal . pause ( ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> Mainline . UserFacingMainline ( <EOL> main , <EOL> sys . argv , <EOL> modulesToInitialize = [ ] <EOL> ) </s>
