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

Strange PID 0 exception behavior on Windows #22

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

Strange PID 0 exception behavior on Windows #22

giampaolo opened this issue May 23, 2014 · 4 comments

Comments

@giampaolo
Copy link
Owner

From billiej...@gmail.com on February 23, 2009 20:05:25

What steps will reproduce the problem?  
>>> psutil.Process(0).kill()
>>> psutil.Process(2408).name
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python26\Lib\site-packages\psutil\psutil.py", line 54, in __init__
    if not pid_exists(pid):
  File "C:\Python26\Lib\site-packages\psutil\psutil.py", line 149, in
pid_exists

    return _platform_impl.pid_exists(pid)
  File "C:\Python26\Lib\site-packages\psutil\_psmswindows.py", line 29, in
pid_e
xists
    return pid in _psutil_mswindows.get_pid_list()
WindowsError: [Error 87] Parametro non corretto
>>>
>>> psutil.Process(2408).name
'xchat.exe'
>>>


It seems that psutil.Process(0).kill() fails internally and that its
exception is "cached" somehow and raised when we attempt to fetch
information from another process.

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

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on February 23, 2009 12:31:35

Fixed in r148 - kill_process() was returning 0 instead of NULL so the exception 
only being set and not raised like it should have been.

Status: Verified

@giampaolo
Copy link
Owner Author

From billiej...@gmail.com on February 24, 2009 15:24:40

Labels: Milestone-0.1.1

@giampaolo
Copy link
Owner Author

From billiej...@gmail.com on March 17, 2009 08:31:20

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 03:44:15

Updated csets after the SVN -> Mercurial migration: r148 == revision 

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