[issue36667] pdb: restore SIGINT handler in sigint_handler already

2019-04-19 Thread daniel hahler


Change by daniel hahler :


--
keywords: +patch
pull_requests: +12804
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36667] pdb: restore SIGINT handler in sigint_handler already

2019-04-19 Thread daniel hahler

New submission from daniel hahler :

Without this, and additional SIGINT while waiting for the next statement
(e.g. during `time.sleep`) will stop at `sigint_handler`.

With this patch:

> …/t-pdb-sigint-in-sleep.py(10)()
-> sleep()
(Pdb) c
^C
Program interrupted. (Use 'cont' to resume).
^CKeyboardInterrupt
> …/t-pdb-sigint-in-sleep.py(6)sleep()
-> time.sleep(10)
(Pdb)

Without this patch:

> …/t-pdb-sigint-in-sleep.py(10)()
-> sleep()
(Pdb) c
^C
Program interrupted. (Use 'cont' to resume).
^C--Call--
> …/cpython/Lib/pdb.py(188)sigint_handler()
-> def sigint_handler(self, signum, frame):
(Pdb)

This was changed / regressed in 
https://github.com/python/cpython/commit/10e54aeaa234f2806b367c66e3fb4ac6568b39f6
 (3.5.3rc1?), when it was moved while fixing issue 20766.

--
components: Library (Lib)
messages: 340539
nosy: blueyed
priority: normal
severity: normal
status: open
title: pdb: restore SIGINT handler in sigint_handler already
type: behavior
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com