Show More
@@ -243,7 +243,17 b' class Kernel(Configurable):' | |||||
243 | self.log.critical("entering eventloop") |
|
243 | self.log.critical("entering eventloop") | |
244 | # restore default_int_handler |
|
244 | # restore default_int_handler | |
245 | signal(SIGINT, default_int_handler) |
|
245 | signal(SIGINT, default_int_handler) | |
246 |
self.eventloop |
|
246 | while self.eventloop is not None: | |
|
247 | try: | |||
|
248 | self.eventloop(self) | |||
|
249 | except KeyboardInterrupt: | |||
|
250 | # Ctrl-C shouldn't crash the kernel | |||
|
251 | self.log.error("KeyboardInterrupt caught in kernel") | |||
|
252 | continue | |||
|
253 | else: | |||
|
254 | # eventloop exited cleanly, this means we should stop (right?) | |||
|
255 | self.eventloop = None | |||
|
256 | break | |||
247 | self.log.critical("exiting eventloop") |
|
257 | self.log.critical("exiting eventloop") | |
248 | # if eventloop exits, IOLoop should stop |
|
258 | # if eventloop exits, IOLoop should stop | |
249 | ioloop.IOLoop.instance().stop() |
|
259 | ioloop.IOLoop.instance().stop() |
General Comments 0
You need to be logged in to leave comments.
Login now