This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author roger.serwy
Recipients asvetlov, roger.serwy, terry.reedy
Date 2012-04-03.03:47:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1333424872.25.0.46213457686.issue14440@psf.upfronthosting.co.za>
In-reply-to
Content
This bug is related to issue12540. The approach taken there is to have the IDLE frontend explicitly kill the subprocess. It's a band-aid to the problem that run.py doesn't exit when the socket to the IDLE frontend closes (either by shell restart or kill -9 on IDLE).

Attached is a patch to cause the subprocess to exit. I have to admit not fully understanding why it works (on Ubuntu 11.04).

It looks like the following code in _getresponse() in rpc.py is what keeps the subprocess running:

    cvar.acquire()
    while myseq not in self.responses:
        cvar.wait()

I also tried disabling the "terminate_subprocess" in PyShell.py. With that change, the subprocess does not terminate on a shell restart (unless my patch is applied). 

Andrew, Terry: What are your thoughts?
History
Date User Action Args
2012-04-03 03:47:52roger.serwysetrecipients: + roger.serwy, terry.reedy, asvetlov
2012-04-03 03:47:52roger.serwysetmessageid: <1333424872.25.0.46213457686.issue14440@psf.upfronthosting.co.za>
2012-04-03 03:47:51roger.serwylinkissue14440 messages
2012-04-03 03:47:51roger.serwycreate