[Python-ideas] Should stdlib provide something to properly handle SIGINT/SIGTERM signals?

Terry Reedy tjreedy at udel.edu
Tue Dec 27 22:58:31 CET 2011

On 12/27/2011 12:57 PM, Giampaolo Rodolà wrote:
> Since this is a problem which occurs very often, I'd like to hear your
> opinion as to whether something like this might find some place in the
> python stdlib (signal module maybe?).
> Please read the discussion included in this recipe:
> http://code.activestate.com/recipes/577997/
> It should provide a description of the problem and the general use case.

It seems to me that your problem is this

"From http://docs.python.org/library/atexit.html:
     the functions registered via this module are not called when the 
program is killed by a signal not handled by Python

So it seems to me that the solution should be an option to change that, 
or rather, change the handling of exit signals.

Terry Jan Reedy

More information about the Python-ideas mailing list