##// END OF EJS Templates
make SIGUSR1 and SIGINFO trigger printing of info...
Paul Ivanov -
Show More
@@ -550,6 +550,10 b' class NotebookApp(BaseIPythonApplication):'
550 550 # but it will work
551 551 signal.signal(signal.SIGINT, self._handle_sigint)
552 552 signal.signal(signal.SIGTERM, self._signal_stop)
553 signal.signal(signal.SIGUSR1, self._signal_info)
554 if hasattr(signal, 'SIGINFO'):
555 # only on BSD-based systems
556 signal.signal(signal.SIGINFO, self._signal_info)
553 557
554 558 def _handle_sigint(self, sig, frame):
555 559 """SIGINT handler spawns confirmation dialog"""
@@ -599,6 +603,9 b' class NotebookApp(BaseIPythonApplication):'
599 603 def _signal_stop(self, sig, frame):
600 604 self.log.critical("received signal %s, stopping", sig)
601 605 ioloop.IOLoop.instance().stop()
606
607 def _signal_info(self, sig, frame):
608 self.print_notebook_info()
602 609
603 610 @catch_config_error
604 611 def initialize(self, argv=None):
General Comments 0
You need to be logged in to leave comments. Login now