Patches item #1529142, was opened at 2006-07-26 20:45 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1529142&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: IDLE Group: None Status: Open Resolution: None Priority: 5 Submitted By: Tal Einat (taleinat) Assigned to: Nobody/Anonymous (nobody) Summary: Allowing multiple instances of IDLE with sub-processes Initial Comment: (See patch 1201569 "allow running multiple instances of IDLE" for previous discussion on this topic) To summarize discussion up to this point: There is a problem doing this on Windows since more than one listening socket can be openned on a single port. I suggest we "dodge" the Windows problem for now by having IDLE try a random port every time (like in the IDLEfork patch 661363) - thus collisions will be kept to a minimum. If we choose among over 10,000 ports, most users will never encounter a port collision. And even when a collision does happen, it will probably be detected and properly dealt with - collision non-detection errors are, as Kurt mentioned, erratic. This patch chooses a port from range(49152, 65536), which are the 'dynamic' ports as described by the DCCP (see http://www.iana.org/assignments/port-numbers), and avoids known 'dangerous' ports (used by trojans, worms, etc.) which I gathered by Googling for half an hour. I replaced socket.timeout with select(), since I find its timeout mechanism is more reliable. (Currently, Python's socket's timeout mechanism raises unexpected, unexplained errors on Windows.) I also changed the flow a bit, so if a timeout occurs after a sub-process is spawned, the subprocess is killed. IMO This requires thorough testing. I tested it for half an hour on my WinXP Python2.4.3, and after fixing typos and such, everything seems to work. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1529142&group_id=5470 _______________________________________________ Patches mailing list Patches@python.org http://mail.python.org/mailman/listinfo/patches