kiranvizru / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

Error while setting affinity on Windows #294

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
import os, psutil
p = psutil.Process(os.getpid())
p.get_cpu_affinity()
result: [0, 1, 2, 3]
p.set_cpu_affinity([2, 3])
p.get_cpu_affinity()

What is the expected output?
[2, 3]

What do you see instead?
[0]

What version of psutil are you using? What Python version?
0.5
Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on 
win32

On what operating system? Is it 32bit or 64bit version?
Win 7 x64 SP1

Original issue reported on code.google.com by maciej.l...@gmail.com on 29 Jun 2012 at 5:31

GoogleCodeExporter commented 9 years ago
This is probably one of the silliest mistakes I've ever made before releasing.
There was an hard coded "1" in the the function call and the actual CPU mask 
was ignored. Probably a leftover of when I was conducting God knows what tests 
which wasn't covered by unittests.
I'll release a 0.5.1 version including this fix soon, probably later today 
(argh!!!).

Original comment by g.rodola on 29 Jun 2012 at 12:39

GoogleCodeExporter commented 9 years ago
Ok, I've just released a new 0.5.1 version.
Closing out as fixed.

Original comment by g.rodola on 29 Jun 2012 at 4:47