A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-March/098304.html below:

[Python-Dev] Catch SIGINT at Python startup

[Python-Dev] Catch SIGINT at Python startup [Python-Dev] Catch SIGINT at Python startupVictor Stinner victor.stinner at haypocalc.com
Mon Mar 8 21:50:02 CET 2010
Hi,

Le lundi 08 mars 2010 18:47:18, Guido van Rossum a écrit :
> Actually it sounds like there's some overly general except clause
> somewhere that should be adjusted to catch just "Exception" instead of
> "*".

Most of my patches (for SIGINT) are exactly doing that: check the exception 
type instead of "if (result == NULL) PyErr_Clear();" (try/except: pass). About 
initsite(): I consider any error as fatal. If initsite() failed, something 
goes wrong.

I think that my patches are enough to catch SIGINT during the Python 
initialization. I used different tricks to test Python: add kill(getpid(), 
SIGINT), use "signal SIGINT" in gdb, add 
PyErr_SetNone(PyExc_KeyboardInterrupt), ... valgrind is a very good tool to 
slow down any process :-D

-- 
Victor Stinner
http://www.haypocalc.com/
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4