Conditionally setup SIGHUP handler if the OS supports it
The recent commit breaks debugging on windows because it doesn't support SIGHUP. According to the docs "Note that not all systems define the same set of signal names; only those names defined by the system are defined by this module."
@@ -14,6 +14,7 @@ from . import PY2, is_string, debugger_api
log = logging.getLogger('main')
signal.signal(signal.SIGINT, signal.SIG_DFL)
+if hasattr(signal, 'SIGHUP'):
signal.signal(signal.SIGHUP, signal.SIG_DFL)
sys.modules['debugger'] = debugger_api
