[Patches] [ python-Patches-1467770 ] add Popen objects to _active only in __del__,

SourceForge.net noreply at sourceforge.net
Mon Apr 10 18:05:10 CEST 2006


Patches item #1467770, was opened at 2006-04-10 16:54
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1467770&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: Library (Lib)
Group: Python 2.5
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: cheops (atila-cheops)
Assigned to: Peter Ã
strand (astrand)
Summary: add Popen objects to _active only in __del__, 

Initial Comment:
attached a patch for subprocess.py
this is for bug #1460493 Why not drop the _active list?
popen2.py is patched (revision 43286), this is a (try)
to patch subprocess.py accordingly.
Bug #1183780: Add Popen objects to _active only in __del__.
Cleanup terminated processes as well.

revision 43287 adds a small modification with an
assert, but that is not included.

I'm not sure about the wait(self) function under the
windows part, there is no check for an error, and the
_deadstate protection is not used

verified on windows XP SP2 32bits (python2.4 with
patched subprocess.py from 2.5a1) with the
'popen_bug.py -s '-script from bug #1183780 but with
the following call: pipe = subprocess.Popen("calc")
then in windows xp do a "close group" action on all the
calculator windows (right click on the task bar).

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2006-04-10 18:05

Message:
Logged In: YES 
user_id=21627

Thanks for the patch. I made a number of modifications:
- add poll(_deadstate) argument for Unix
- trace whether a child was actually created, else
returncode would not have been set (not even to None) in __del__
With these modifications, I committed it as r45234.

----------------------------------------------------------------------

Comment By: cheops (atila-cheops)
Date: 2006-04-10 17:02

Message:
Logged In: YES 
user_id=1276121

patch was not uploaded

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1467770&group_id=5470


More information about the Patches mailing list