Roger Serwy added the comment:

Keeping the sys.stdin reference alive and then reassigning sys.stdin prevents 
exit() and quit() from actually closing IDLE since site.py's code closes 
sys.stdin which then does not trigger PyShell's close() method. I updated 
Terry's patch to explicitly call the close method when SystemExit gets raised.

IDLE's subprocess clears atexit handlers before shutdown so they never get 
called. See exit() from Lib/idlelib/run.py.

The debugger can not handle stepping through a "raise SystemExit" from the 
shell, even long before any sys.std* patches got applied. That's a separate 
issue that should be opened. I mention that so that if anyone manually tests 
with the debugger that this behavior is "expected".

----------
Added file: http://bugs.python.org/file30112/Terry17838_rev1.patch

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

Reply via email to