Go to the documentation of this file.00001
00002
00003 from openrtm_tools import rtmlaunch
00004
00005 import signal, sys
00006 def signal_handler(signum, frame):
00007 sigdict = dict((k, v) for v, k in signal.__dict__.iteritems() if v.startswith('SIG'))
00008 print >>sys.stderr, "\033[33m[rtmlaunch] Catch signal %r, exitting...\033[0m"%(sigdict[signum])
00009 sys.exit(0)
00010
00011 if __name__ == '__main__':
00012 signal.signal(signal.SIGINT, signal_handler)
00013 rtmlaunch.main()
00014
00015
00016
00017