diff -r 37300a1df7d7 Lib/pdb.py --- a/Lib/pdb.py Sat Nov 26 22:02:29 2011 +0100 +++ b/Lib/pdb.py Sat Nov 26 18:59:56 2011 -0800 @@ -955,8 +955,15 @@ Continue execution, only stop when a breakpoint is encountered. """ if not self.nosigint: - self._previous_sigint_handler = \ - signal.signal(signal.SIGINT, self.sigint_handler) + try: + self._previous_sigint_handler = \ + signal.signal(signal.SIGINT, self.sigint_handler) + except ValueError: + # ValueError happens when do_continue() is invoked from + # a non-main thread in which case we just continue without + # SIGINT set. Would printing a message here (once) make + # sense? + pass self.set_continue() return 1 do_c = do_cont = do_continue