<s> """<STR_LIT>""" <EOL> import atexit <EOL> import sys <EOL> from subprocess import Popen <EOL> def cleanup ( controller , engines ) : <EOL> """<STR_LIT>""" <EOL> import signal , time <EOL> print ( '<STR_LIT>' ) <EOL> print ( '<STR_LIT>' ) <EOL> for e in engines : <EOL> e . send_signal ( signal . SIGINT ) <EOL> print ( '<STR_LIT>' ) <EOL> controller . send_signal ( signal . SIGINT ) <EOL> time . sleep ( <NUM_LIT:0.1> ) <EOL> print ( '<STR_LIT>' ) <EOL> controller . kill ( ) <EOL> print ( '<STR_LIT>' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> cont = Popen ( [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ] ) <EOL> print ( '<STR_LIT>' ) <EOL> eng = [ ] <EOL> for i in range ( <NUM_LIT:4> ) : <EOL> eng . append ( Popen ( [ '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' % i ] ) ) <EOL> atexit . register ( lambda : cleanup ( cont , eng ) ) </s>
