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.

classification
Title: signal.default_int_handler should set signal number on the raised exception
Type: enhancement Stage:
Components: Extension Modules Versions: Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: matrixise, pitrou
Priority: normal Keywords:

Created on 2013-02-11 13:59 by pitrou, last changed 2022-04-11 14:57 by admin.

Messages (4)
msg181894 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-02-11 13:59
Having a dedicated optional attribute on KeyboardInterrupt receiving the signal number would be useful in certain circumstances, for example if you want to propagate the signal to a child process.
msg223375 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-17 21:08
Just a gentle reminder.
msg278564 - (view) Author: Stéphane Wirtel (matrixise) * (Python committer) Date: 2016-10-13 11:56
Hi Antoine and Mark,

What's the interest of this "feature" ?

Thank you
msg278565 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2016-10-13 11:58
Basically it allows you to call sys.exit() with the right error code.
History
Date User Action Args
2022-04-11 14:57:41adminsetgithub: 61384
2016-10-13 19:27:50BreamoreBoysetnosy: - BreamoreBoy
2016-10-13 11:58:04pitrousetmessages: + msg278565
2016-10-13 11:56:47matrixisesetnosy: + matrixise
messages: + msg278564
2014-07-17 21:08:07BreamoreBoysetnosy: + BreamoreBoy

messages: + msg223375
versions: + Python 3.5, - Python 3.4
2013-02-11 13:59:50pitroucreate