os.wait() losing child?
Jason Zheng
Xin.Zheng at jpl.nasa.gov
Tue Jul 10 21:09:41 EDT 2007
greg wrote:
> Jason Zheng wrote:
>> while (True):
>> pid = os.wait()
>> ...
>> if (someCondition):
>> break
> > ...
>
> Are you sure that someCondition() always becomes true
> when the list of pids is empty? If not, you may end
> up making more wait() calls than there are children.
>
Regardless of the nature of the someCondition, what I see from the print
output of my python program is that some child processes never triggers
the unblocking of os.wait() call.
~Jason
More information about the Python-list
mailing list