Author roger.serwy
Recipients Guilherme.Simões, Todd.Rovito, benjamin.peterson, georg.brandl, larry, roger.serwy, serhiy.storchaka, terry.reedy
Date 2013-05-03.04:50:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1367556606.2.0.644222252086.issue17838@psf.upfronthosting.co.za>
In-reply-to
Content
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".
History
Date User Action Args
2013-05-03 04:50:06roger.serwysetrecipients: + roger.serwy, georg.brandl, terry.reedy, larry, benjamin.peterson, Todd.Rovito, serhiy.storchaka, Guilherme.Simões
2013-05-03 04:50:06roger.serwysetmessageid: <1367556606.2.0.644222252086.issue17838@psf.upfronthosting.co.za>
2013-05-03 04:50:06roger.serwylinkissue17838 messages
2013-05-03 04:50:05roger.serwycreate