On Tue, 20 Jul 2010 10:32:12 -0700, Chris Rebert wrote:

> I believe you need to /eventually/ call .wait() as shown to avoid the
> child becoming a zombie process.

Alternatively, you can call .poll() periodically. This is similar to
.wait() insofar as it will "reap" the process if it has terminated, but
unlike .wait(), .poll() won't block if the process is still running.

On Unix, you can use os.fork(), have the child execute the command in the
background, and have the parent wait for the child with os.wait(). The
child will terminate as soon as it has spawned the grandchild, and the
grandchild will be reaped automatically upon termination (so you can
forget about it).


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to