Merge pull request #1253 from mhils/fix-debug

Fix Debug Mode on Windows
This commit is contained in:
Aldo Cortesi 2016-06-14 17:12:02 +12:00 committed by GitHub
commit a63817f2b8
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,6 @@
from __future__ import (absolute_import, print_function, division)
import os
import sys
import threading
import signal
@ -93,6 +94,7 @@ def dump_stacks(signal, frame, file=sys.stdout):
print("\n".join(code), file=file)
def register_info_dumpers(): # pragma: no cover
signal.signal(signal.SIGUSR1, dump_info)
signal.signal(signal.SIGUSR2, dump_stacks)
def register_info_dumpers():
if os.name != "nt":
signal.signal(signal.SIGUSR1, dump_info)
signal.signal(signal.SIGUSR2, dump_stacks)

View File

@ -18,3 +18,7 @@ def test_dump_stacks():
def test_sysinfo():
assert debug.sysinfo()
def test_register_info_dumpers():
debug.register_info_dumpers()