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 Jason.Baker
Recipients Jason.Baker, docs@python
Date 2010-10-07.21:34:52
SpamBayes Score 2.7978533e-06
Marked as misclassified No
Message-id <1286487295.44.0.431847380909.issue10046@psf.upfronthosting.co.za>
In-reply-to
Content
There's an issue with the documentation on the atexit module[1].  It states:

"Note: the functions registered via this module are not called when the program is killed by a signal, when a Python fatal internal error is detected, or when os._exit() is called."

This isn't necessarily true.  For instance, if I start the following script:

from atexit import register
from time import sleep

@register
def end():
    print 'atexit'

while True:
    sleep(1)

...and then do a "kill -SIGINT <pid>", the atexit function gets called.  It would be helpful to have a more detailed description of the rules on how this works.

[1] http://docs.python.org/library/atexit.html#module-atexit
History
Date User Action Args
2010-10-07 21:34:55Jason.Bakersetrecipients: + Jason.Baker, docs@python
2010-10-07 21:34:55Jason.Bakersetmessageid: <1286487295.44.0.431847380909.issue10046@psf.upfronthosting.co.za>
2010-10-07 21:34:53Jason.Bakerlinkissue10046 messages
2010-10-07 21:34:52Jason.Bakercreate