def signalTest(remote='ubuntu2'):
 h = RemoteHost('h0', server=remote)
 h.shell.send_signal(SIGINT)
 h.shell.poll()
 if (h.shell.returncode is None):
  info('signalTest: SUCCESS: ', h, 'has not exited after SIGINT', '\n')
 else:
  info('signalTest: FAILURE:', h, 'exited with code', h.shell.returncode, '\n')
 h.stop()

def signalTest ( remote = 'ubuntu2' ) : h = RemoteHost ( 'h0' , server = remote ) h . shell . send_signal ( SIGINT ) h . shell . poll ( ) if ( h . shell . returncode is None ) : info ( 'signalTest: SUCCESS: ' , h , 'has not exited after SIGINT' , '\n' ) else : info ( 'signalTest: FAILURE:' , h , 'exited with code' , h . shell . returncode , '\n' ) h . stop ( )
make sure hosts are robust to signals .