Close #25368: Fix test_eintr when Python is compiled without thread support
This commit is contained in:
parent
6da624098f
commit
647dac9d6f
|
@ -52,6 +52,7 @@ class EINTRBaseTest(unittest.TestCase):
|
|||
cls.signal_period)
|
||||
|
||||
# Issue #25277: Use faulthandler to try to debug a hang on FreeBSD
|
||||
if hasattr(faulthandler, 'dump_traceback_later'):
|
||||
faulthandler.dump_traceback_later(10 * 60, exit=True)
|
||||
|
||||
@classmethod
|
||||
|
@ -62,6 +63,7 @@ class EINTRBaseTest(unittest.TestCase):
|
|||
def tearDownClass(cls):
|
||||
cls.stop_alarm()
|
||||
signal.signal(signal.SIGALRM, cls.orig_handler)
|
||||
if hasattr(faulthandler, 'cancel_dump_traceback_later'):
|
||||
faulthandler.cancel_dump_traceback_later()
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in New Issue