[New-bugs-announce] [issue10046] Correction to atexit documentation

Jason Baker report at bugs.python.org
Thu Oct 7 23:34:55 CEST 2010


New submission from Jason Baker <amnorvend at gmail.com>:

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

----------
assignee: docs at python
components: Documentation
messages: 118141
nosy: Jason.Baker, docs at python
priority: normal
severity: normal
status: open
title: Correction to atexit documentation
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10046>
_______________________________________


More information about the New-bugs-announce mailing list