terminating an inactive process

Earl Eiland eee at nmt.edu
Sat Apr 2 10:05:49 EST 2005


I'm running a PyWin program that executes another program using
subprocess.Popen().  Unfortunately, this other program isn't well
behaved, and frequently terminates without terminating its process. 
After this happens enough times, all my memory is tied up, and the
machine crashes.

Using subprocess.poll(), I can keep my program from hanging, by timing
out the process, and starting anew.  This still leaves the previous
process hogging memory.  How do I kill the old process in Windows?

Earl




More information about the Python-list mailing list