<s> import os <EOL> import signal <EOL> import sys <EOL> import time <EOL> class Echo ( object ) : <EOL> def __init__ ( self ) : <EOL> signal . signal ( signal . SIGQUIT , self . handle_quit ) <EOL> signal . signal ( signal . SIGTERM , self . handle_quit ) <EOL> signal . signal ( signal . SIGINT , self . handle_quit ) <EOL> signal . signal ( signal . SIGCHLD , self . handle_chld ) <EOL> self . alive = True <EOL> def handle_quit ( self , * args ) : <EOL> self . alive = False <EOL> sys . exit ( <NUM_LIT:0> ) <EOL> def handle_chld ( self , * args ) : <EOL> return <EOL> def run ( self ) : <EOL> while self . alive : <EOL> c = sys . stdin . readline ( ) <EOL> sys . stdout . write ( c ) <EOL> sys . stdout . flush ( ) <EOL> time . sleep ( <NUM_LIT:0.1> ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> Echo ( ) . run ( ) </s>
