[issue10046] Correction to atexit documentation

2010-10-14 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

Fixed in r85452.

--
resolution:  - fixed
status: open - closed

___
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



[issue10046] Correction to atexit documentation

2010-10-08 Thread Georg Brandl

Georg Brandl ge...@python.org added the comment:

One could also argue that on SIGINT, the program is not killed but 
interrupted by the signal :)

What about ... killed by an unhandled signal ...?

--
nosy: +georg.brandl

___
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



[issue10046] Correction to atexit documentation

2010-10-08 Thread Jason Baker

Jason Baker amnorv...@gmail.com added the comment:

I like that phrasing.  I think it would be a good idea to mention that this 
includes SIGINT by default, just to be explicit.

--

___
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



[issue10046] Correction to atexit documentation

2010-10-07 Thread Jason Baker

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



[issue10046] Correction to atexit documentation

2010-10-07 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

It is possible this behavior changed after the docs were written.  I'm adding a 
couple of people to nosy who might have some insight into that possibility.  It 
could be either a change in finalization procedures or a change in signal 
handling semantics, I think.

--
nosy: +Rhamphoryncus, pitrou, r.david.murray

___
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



[issue10046] Correction to atexit documentation

2010-10-07 Thread Adam Olsen

Adam Olsen rha...@gmail.com added the comment:

Signals can directly kill a process.  Try SIGTERM to see this.  SIGINT is 
caught and handled by Python, which just happens to default to a graceful exit 
(unless stuck in a lib that prevents that.)  Try pasting your script into an 
interactive interpreter session and you'll see that it doesn't exit at all.

--

___
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