diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2016-02-24 09:19:39 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2016-02-24 09:19:39 +0100 |
commit | d0060f0d2d1eae75dc9d419a1a782f19b43bcf6f (patch) | |
tree | 67e22de31351814313906811527dbc46600437d3 | |
parent | e7309891bbe03d7a2950021e2e290af8d86bd021 (diff) | |
download | psutil-d0060f0d2d1eae75dc9d419a1a782f19b43bcf6f.tar.gz |
fix #776 / linux / cpu_affinity: set right C type for Py_ArgParse
-rw-r--r-- | CREDITS | 4 | ||||
-rw-r--r-- | HISTORY.rst | 9 | ||||
-rw-r--r-- | TODO | 25 | ||||
-rw-r--r-- | psutil/_psutil_linux.c | 4 |
4 files changed, 19 insertions, 23 deletions
@@ -378,3 +378,7 @@ I: 660 N: Mozilla Foundation D: sample code for process USS memory. + +N: wxwright +W: https://github.com/wxwright +I: 776 diff --git a/HISTORY.rst b/HISTORY.rst index e3c54cff..296dc85f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,5 +1,14 @@ Bug tracker at https://github.com/giampaolo/psutil/issues +4.1.0 - XXXX-XX-XX +================== + +**Bug fixes** + +- #776: [Linux] Process.cpu_affinity() may erroneously raise NoSuchProcess. + (patch by wxwright) + + 4.0.0 - 2016-02-17 ================== @@ -9,8 +9,6 @@ https://github.com/giampaolo/psutil/issues PLATFORMS ========= - * #429 (patch): NetBSD - * #355 (patch): Android * #605 (branch): AIX @@ -19,6 +17,8 @@ PLATFORMS * DragonFlyBSD + * HP-UX + HIGHER PRIORITY =============== @@ -26,8 +26,8 @@ HIGHER PRIORITY * #371: CPU temperature (apparently OSX and Linux only; on Linux it requires lm-sensors lib). - * #269: expose network ifaces RX/TW queues. This should probably go into - net_if_stats(). Figure out on what platforms this is supported: + * #269: NIC rx/tx queue. This should probably go into net_if_stats(). + Figure out on what platforms this is supported: Linux: yes Others: ? @@ -44,8 +44,6 @@ HIGHER PRIORITY * #604: emulate os.getloadavg() on Windows - * #269: NIC rx/tx queue. - LOWER PRIORITY ============== @@ -89,8 +87,6 @@ DEBATABLE limiting per-process network IO resources though, which is great). Needs further reading. - * Should we expose OS constants (psutil.WINDOWS, psutil.OSX etc.)? - * Python 3.3. exposed different sched.h functions: http://docs.python.org/dev/whatsnew/3.3.html#os http://bugs.python.org/issue12655 @@ -152,19 +148,6 @@ DEBATABLE * Have psutil.Process().cpu_affinity([]) be an alias for "all CPUs"? -COMPATIBILITY BREAKAGE -====================== - -Removals (will likely happen in 2.2): - - * (S) psutil.Process.nice (deprecated in 0.5.0) - * (S) get_process_list (deprecated in 0.5.0) - * (S) psutil.*mem* functions (deprecated in 0.3.0 and 0.6.0) - * (M) psutil.network_io_counters (deprecated in 1.0.0) - * (M) local_address and remote_address Process.connection() namedtuple fields - (deprecated in 1.0.0) - - REJECTED IDEAS ============== diff --git a/psutil/_psutil_linux.c b/psutil/_psutil_linux.c index 2cf2a7db..78a5408d 100644 --- a/psutil/_psutil_linux.c +++ b/psutil/_psutil_linux.c @@ -275,7 +275,7 @@ psutil_proc_cpu_affinity_get(PyObject *self, PyObject *args) { cpu_set_t *mask = NULL; PyObject *py_list = NULL; - if (!PyArg_ParseTuple(args, "i", &pid)) + if (!PyArg_ParseTuple(args, "l", &pid)) return NULL; ncpus = NCPUS_START; while (1) { @@ -342,7 +342,7 @@ psutil_proc_cpu_affinity_get(PyObject *self, PyObject *args) { PyObject* py_retlist = NULL; PyObject *py_cpu_num = NULL; - if (!PyArg_ParseTuple(args, "i", &pid)) + if (!PyArg_ParseTuple(args, "l", &pid)) return NULL; CPU_ZERO(&cpuset); if (sched_getaffinity(pid, len, &cpuset) < 0) |