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

wait function raises a TimeoutException when a process returns -1 (Windows) #164

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

Comments

@giampaolo
Copy link
Owner

From amnio...@gmail.com on May 18, 2011 09:00:22

What steps will reproduce the problem?  
1.Create a process that has an exit code of -1
2.Launch that process and use wait with no arguments
3.wait function will raise a TimeoutException, but there is no timeout, the 
application exits with -1, so it should return -1 instead 

What version of psutil are you using? What Python version?  
It happens on 0.2.1 and on trunk as of 18/05/2011

On what operating system? 
Tested on WinXP/Win7 

Please provide any additional information below.  
trunk/psutil/_psmswindows.py  -> Line 167 & 168 (it checks for -1)
trunk/psutil/_psutil_mswindows.c -> function process_wait

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

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on May 18, 2011 05:32:50

I've modified the code in r971 to return and check for the actual WAIT_TIMEOUT 
value instead of -1, so that should solve this issue. However, If the process 
for some reason returns WAIT_TIMEOUT (0x00000102) then this will still occur. 
Since -1 is a moderately likely return value and 0x00000102 less so, I think 
that's a reasonable compromise.

Status: FixedInSVN
Labels: OpSys-Windows Milestone-0.2.2

@giampaolo
Copy link
Owner Author

From g.rodola on June 27, 2011 10:52:41

Labels: Milestone-0.3.0

@giampaolo
Copy link
Owner Author

From g.rodola on July 08, 2011 12:07:35

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 04:00:19

Updated csets after the SVN -> Mercurial migration: r971 == revision 
70284e93f610

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