Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process' create_time() should raise NoSuchProcess for zombie processes #77

Closed
giampaolo opened this issue May 23, 2014 · 4 comments
Closed

Comments

@giampaolo
Copy link
Owner

From [email protected] on February 23, 2010 00:31:32

What steps will reproduce the problem?  
>>> p = psutil.Process(1340)
>>> p.kill()
>>> p.create_time
1266881247.0
>>> 

What is the expected output?  


What do you see instead?  
I'd expect NoSuchProcess to be raised after the process has been killed.
This is similar to issue 36 and issue 76 .

Original issue: http://code.google.com/p/psutil/issues/detail?id=77

@giampaolo
Copy link
Owner Author

From [email protected] on February 22, 2010 15:40:14

Fixed as r513 by having used GetExitCodeProcess().

Status: WaitingForReview

@giampaolo
Copy link
Owner Author

From [email protected] on February 23, 2010 12:41:47

Despite the Windows C code implementation was actually broken, it turns out the
problem is affecting all platforms because kill() calls is_running(), which calls
create_time, so when we invoke "create_time" we are receiving the value which was
previously cached because of kill(), the underlying platform code is not called and
NoSuchProcess never gets raised.

We just didn't notice this before because there wasn't a test yet.

I fixed this as r516 .

Status: Fixed
Labels: -OpSys-Windows Milestone-0.1.3 Progress-4in4

@giampaolo
Copy link
Owner Author

From [email protected] on February 28, 2010 06:56:31

A similar problem was affecting OSX C code, now fixed as r524 .

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 03:51:51

Updated csets after the SVN -> Mercurial migration: r513 == revision 8c07d4573bca r516 == revision c9f4cc7f1e9d r524 == revision 2b8a9c94b4d3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant