Run multiple IDLEforks on the same machine simultanously
Status: Beta
Brought to you by:
kbk
Instead of defining a specific port (8833), a list of
legitimate ports is defined. When IDLE starts, it goes
over the list and tries each of the ports. When it
finds a port which is ok, it starts the subprocess.
The list of ports which I defined is very arbitrary,
and should be reviewed.
A more minor change, which is calling the
spawn_subprocess method only after the RPCClient class
was succesfully initialized, solves the bug that when
opening a second IDLE, an error message is displayed
but a malfunctioning shell window is displayed, and
when it's closed, the subprocess keeps on running until
the first IDLE is shut down.
Logged In: YES
user_id=149084
Converted Noam Raphael's file to a context patch
PyShell.patch
Logged In: YES
user_id=679426
This better patch tries the ports at a random order, which
is much faster when some IDLEfork instances are already running.
Logged In: YES
user_id=149084
I have implemented the second change: spawn after
successful port binding.
Having done this, I no longer see the spurious
processes being spawned on Linux.
However, on W2K I have at least once seen a second
copy of IDLEfork start listening on the 8833 port used
by the original copy. Then it went ahead and spawned
a subprocess in spite of this change.
Until we figure that out (it's not supposed to happen, as
far as I know) I don't want to create a bigger mess by
allowing multiple IDLEforks to run.
Logged In: NO
Noam Raphael reported to USG SPAMList