[Idle-dev] Fix for long delays
dscherertemp at gmail.com
Thu Jun 5 20:10:49 CEST 2008
I'm back from my trip.
> Exception exceptions.AttributeError: "'NoneType' object has no attribute
> 'maxint'" in <bound method Popen.__del__ of <subprocess.Popen object at
> 0x9007e0c>> ignored
Believe it or not, this appears to be a bug in the subprocess module that
was fixed in Python 2.5.1. The relevant checkin is this
> I had to adjust the patch a bit as it got mangled through the mailer (and
> I've attached the version to this email) so please check that I got it all.
What you sent looks right to me, though the bug Tal pointed out is still
there (SIGTERM = 9 instead of SIGKILL = 9).
> I agree that for the us the "no subprocess mode" causes confusion. I'd vote
> to make get rid of it, or at least to not make it the default.
> I certainly agree that using a subprocess should always be the default.
> However, no-subprocess mode is very useful in certain cases, such as
> debugging IDLE itself, so we'd need a good reason to get rid of it.
Agreed. This isn't as high priority for us as the termination issue, but it
would be best to default to using a subprocess regardless of how IDLE is
started, and to support multiple instances of IDLE with subprocesses.
There's no problem with having a command line option or setting for
no-subprocess mode, it just shouldn't happen to the naive user.
> The reason no-subprocess mode is the default on Windows is to avoid
> trying to open more than subprocess, since opening a second one
> usually fails because of port clashes. About a year ago I worked up a
> patch: http://bugs.python.org/issue1529142, "Allowing multiple
> instances of IDLE with sub-processes". The problem with it is that I
> haven't been able to get it accepted, because of lack of interest and
> its relative complexity.
Why not just bind to port 0 ("any") and then do self.port =
self.rpcclt.listening_sock.getsockname() to find what port the OS has
assigned? I tried that and IWFM.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IDLE-dev