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(0).kill() raises WindowsError exception #24

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

Process(0).kill() raises WindowsError exception #24

giampaolo opened this issue May 23, 2014 · 4 comments

Comments

@giampaolo
Copy link
Owner

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

What steps will reproduce the problem?  
>>> psutil.Process(0).kill()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python26\Lib\site-packages\psutil\psutil.py", line 140, in kill
    _platform_impl.kill_process(self.pid, sig)
  File "C:\Python26\Lib\site-packages\psutil\_psmswindows.py", line 21, in
wrapper
    return callable(*args, **kwargs)
  File "C:\Python26\Lib\site-packages\psutil\_psmswindows.py", line 44, in
kill_process
    return _psutil_mswindows.kill_process(pid)
WindowsError: [Error 87] Incorrect parameter


It seems we have to add another special case when killing PID 0.
Are you ok with raising InsufficientPrivileges?

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

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on February 24, 2009 13:04:22

Yes, this should raise an AccessDenied exception, it makes no sense to be able 
kill process 0 anyway.

@giampaolo
Copy link
Owner Author

From billiej...@gmail.com on February 24, 2009 14:12:29

Fixed as r164 .

Status: Verified

@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:29

Updated csets after the SVN -> Mercurial migration: r164 == 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