##// END OF EJS Templates
re-enter kernel.eventloop after catching SIGINT
MinRK -
Show More
@@ -201,12 +201,17 b' class Kernel(Configurable):'
201 # stop ignoring sigint, now that we are out of our own loop,
201 # stop ignoring sigint, now that we are out of our own loop,
202 # we don't want to prevent future code from handling it
202 # we don't want to prevent future code from handling it
203 signal(SIGINT, default_int_handler)
203 signal(SIGINT, default_int_handler)
204 if self.eventloop is not None:
204 while self.eventloop is not None:
205 try:
205 try:
206 self.eventloop(self)
206 self.eventloop(self)
207 except KeyboardInterrupt:
207 except KeyboardInterrupt:
208 # Ctrl-C shouldn't crash the kernel
208 # Ctrl-C shouldn't crash the kernel
209 io.raw_print("KeyboardInterrupt caught in kernel")
209 io.raw_print("KeyboardInterrupt caught in kernel")
210 continue
211 else:
212 # eventloop exited cleanly, this means we should stop (right?)
213 self.eventloop = None
214 break
210
215
211
216
212 def record_ports(self, ports):
217 def record_ports(self, ports):
General Comments 0
You need to be logged in to leave comments. Login now