[ python-Bugs-1460493 ] Why not drop the _active list?

SourceForge.net noreply at sourceforge.net
Thu Mar 30 09:43:05 CEST 2006


Bugs item #1460493, was opened at 2006-03-28 23:16
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1460493&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: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: HVB bei TUP (hvb_tup)
Assigned to: Nobody/Anonymous (nobody)
Summary: Why not drop the _active list?

Initial Comment:
I am using a modified version of subprocess.py,

where I have removed the _active list and all 
references to it.

I have tested it (under Windows 2000) and there were 
no errors.

So what is the reason for managing the _active list 
at all? Why not drop it?

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

>Comment By: Neal Norwitz (nnorwitz)
Date: 2006-03-29 23:43

Message:
Logged In: YES 
user_id=33168

If you always called wait() the _active list isn't
beneficial to you.  However, many people do not call wait
and the _active list provides a mechanism to cleanup zombied
children.  This is important for many users.

If you need thread safely, you can handle the locking
yourself before calling poll()/wait().

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

Comment By: Martin v. Löwis (loewis)
Date: 2006-03-29 12:41

Message:
Logged In: YES 
user_id=21627

The purpose of the _active list is to wait(2) for open
processes. It needs to stay.

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

Comment By: Tristan Faujour (tfaujour)
Date: 2006-03-29 05:59

Message:
Logged In: YES 
user_id=1488657

I agree.

The use of _active makes subprocess.py thread-UNsafe.

See also: Bug #1199282

In order to have a thread-safe subprocess.py, I commented
out the call to _cleanup() in Popen.__init__(). As a side
effect, _active becomes useless.


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

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


More information about the Python-bugs-list mailing list