Permalink
Browse files

check for SIGUSR1 before using it, closes #3074

thanks @takluyver for spotting this
  • Loading branch information...
1 parent 2f0cc6b commit 13baef801784c613f996a3fc1e4a3efcc26063f6 @ivanov committed Mar 25, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 IPython/frontend/html/notebook/notebookapp.py
@@ -550,7 +550,9 @@ def init_signal(self):
# but it will work
signal.signal(signal.SIGINT, self._handle_sigint)
signal.signal(signal.SIGTERM, self._signal_stop)
- signal.signal(signal.SIGUSR1, self._signal_info)
+ if hasattr(signal, 'SIGUSR1'):
+ # Windows doesn't support SIGUSR1
+ signal.signal(signal.SIGUSR1, self._signal_info)
if hasattr(signal, 'SIGINFO'):
# only on BSD-based systems
signal.signal(signal.SIGINFO, self._signal_info)

0 comments on commit 13baef8

Please sign in to comment.