New submission from Jason Baker <amnorv...@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: d...@python
components: Documentation
messages: 118141
nosy: Jason.Baker, d...@python
priority: normal
severity: normal
status: open
title: Correction to atexit documentation
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10046>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to