diff -r 37300a1df7d7 Lib/test/test_pdb.py --- a/Lib/test/test_pdb.py Sat Nov 26 22:02:29 2011 +0100 +++ b/Lib/test/test_pdb.py Sun Nov 27 20:06:48 2011 -0800 @@ -613,6 +613,34 @@ self.assertNotIn(b'SyntaxError', stdout, "Got a syntax error running test script under PDB") + def test_issue13210(self): + # invoking "continue" on a non-main thread triggered an exception + # inside signal.signal + + with open(support.TESTFN, 'wb') as f: + f.write(b''' +import threading +import pdb + +def start_pdb(): + pdb.Pdb().set_trace() + x = 1 + y = 1 + +t = threading.Thread( target=start_pdb) +t.start() +''') + cmd = [sys.executable, '-u', support.TESTFN] + proc = subprocess.Popen(cmd, + stdout=subprocess.PIPE, + stdin=subprocess.PIPE, + stderr=subprocess.STDOUT, + ) + self.addCleanup(proc.stdout.close) + stdout, stderr = proc.communicate(b'cont\n') + self.assertNotIn('Error', stdout.decode(), + "Got an error running test script under PDB") + def tearDown(self): support.unlink(support.TESTFN)