homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xdegaye
Recipients georg.brandl, xdegaye
Date 2014年09月27日.08:40:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1411807239.7.0.969118354208.issue22502@psf.upfronthosting.co.za>
In-reply-to
Content
With the following script:
import time
def foo():
 import pdb; pdb.set_trace()
 while 1:
 time.sleep(.5)
foo()
Hitting ^C after continue gives:
$ ./python foo.py
> foo.py(5)foo()
-> while 1:
(Pdb) continue
^C
Program interrupted. (Use 'cont' to resume).
--Call--
> Lib/signal.py(51)signal()
-> @_wraps(_signal.signal)
(Pdb)
This is fixed with the following change:
diff --git a/Lib/pdb.py b/Lib/pdb.py
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -186,9 +186,9 @@
 raise KeyboardInterrupt
 self.message("\nProgram interrupted. (Use 'cont' to resume).")
 self.set_step()
- self.set_trace(frame)
 # restore previous signal handler
 signal.signal(signal.SIGINT, self._previous_sigint_handler)
+ self.set_trace(frame)
 def reset(self):
 bdb.Bdb.reset(self)
History
Date User Action Args
2014年09月27日 08:40:39xdegayesetrecipients: + xdegaye, georg.brandl
2014年09月27日 08:40:39xdegayesetmessageid: <1411807239.7.0.969118354208.issue22502@psf.upfronthosting.co.za>
2014年09月27日 08:40:39xdegayelinkissue22502 messages
2014年09月27日 08:40:38xdegayecreate

AltStyle によって変換されたページ (->オリジナル) /