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 <>
Keeping the sys.stdin reference alive and then reassigning sys.stdin prevents exit() and quit() from actually closing IDLE since'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/

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".
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: <>
2013-05-03 04:50:06roger.serwylinkissue17838 messages
2013-05-03 04:50:05roger.serwycreate