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.

classification
Title: add Popen objects to _active only in __del__,
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: astrand Nosy List: astrand, atila-cheops, loewis
Priority: normal Keywords: patch

Created on 2006-04-10 14:54 by atila-cheops, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
subprocess.py.patch atila-cheops, 2006-04-10 15:02
Messages (3)
msg49980 - (view) Author: cheops (atila-cheops) Date: 2006-04-10 14:54
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).
msg49981 - (view) Author: cheops (atila-cheops) Date: 2006-04-10 15:02
Logged In: YES 
user_id=1276121

patch was not uploaded
msg49982 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-04-10 16:05
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.
History
Date User Action Args
2022-04-11 14:56:16adminsetgithub: 43185
2006-04-10 14:54:48atila-cheopscreate