Closed
Description
From g.rodola on July 07, 2011 12:49:27
What steps will reproduce the problem?
p = psutil.Process(os.getpid())
x = 0
while 1:
x += 1
p.get_threads()
print x
What is the expected output?
What do you see instead?
After a while the script above will fail with a NoSuchProcess "process no
longer exists" exception.
Problem is OpenThread() call in _psutil_mswindows.c which suddenly fails with
ERROR_INVALID_PARAMETER which we treat as a synonym for "NoSuchProcess".
Still not sure what is the right thing to do in that case.
Original issue: http://code.google.com/p/psutil/issues/detail?id=180