summaryrefslogtreecommitdiff
path: root/psutil/_psutil_linux.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix a compile error in _psutil_linux.c if PSUTIL_HAVE_IOPRIO is false (#1695)Anselm Kruis2020-02-151-1/+1
| | | The macro PSUTIL_HAVE_IOPRIO is always defined.
* #1672, #1682: SIZEOF_INT is not available on pypy3; assume that on systems ↵Giampaolo Rodola2020-02-091-1/+1
| | | | where pid_t size can't be determined at runtime pid_t is an int
* Properly handle PID type in C (#1672)Giampaolo Rodola2020-01-291-11/+16
|
* Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616)Riccardo Schirone2019-11-131-7/+7
| | | | | | | | | | | | | | These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creation of those python objects, the refcount to previously allocated objects is dropped again with Py_XDECREF, which should be a no-op in case the paramater is NULL. Even so, in most of these loops the variables pointing to the objects are never set to NULL, even after Py_DECREF is called at the end of the loop iteration. This means, after the first iteration, if an error occurs those python objects will get their refcount dropped two times, resulting in a possible double-free.
* Refactor C modules init (#1603)Giampaolo Rodola2019-10-211-76/+52
|
* fix #1126: cpu_affinity() segfaults on CentOS 5Giampaolo Rodola2019-10-101-48/+10
| | | | | | Remove cpu_affinity() support for CentOS 5 (it's 8 years old anyway); remove the dual implementation. Recent manylinux versions should use CentOS 6.
* expose WINVER constants in the cext moduleGiampaolo Rodola2019-02-251-2/+2
|
* #1428 in case of error, show the C syscall which caused itGiampaolo Rodola2019-02-241-3/+4
|
* #1394 / windows / process exe(): convert errno 0 into ERROR_ACCESS_DENIED; ↵Giampaolo Rodola2019-01-251-1/+4
| | | | errno 0 occurs when the Python process runs in 'Virtual Secure Mode'
* fix #1307: [Linux] disk_partitions() does not honour PROCFS_PATHGiampaolo Rodola2018-10-191-3/+6
|
* define a setup() function which is called on import by all C modulesGiampaolo Rodola2017-11-121-0/+2
|
* refactor PSUTIL_TESTING C APIsGiampaolo Rodola2017-11-121-3/+1
|
* fix #1169: (Linux) users() hostname returns username insteadGiampaolo Rodola2017-11-111-1/+1
|
* get rid of PSUTIL_TESTING env var: it must be necessarily set from cmdline, ↵psutil-test-flagGiampaolo Rodola2017-11-111-2/+4
| | | | hence 'python -m psutil.tests' won't work out of the box
* remove useless lineGiampaolo Rodola2017-05-181-2/+0
|
* PSUTIL_TESTING env var (#1083)Giampaolo Rodola2017-05-181-1/+5
| | | | | | | | | | | | | | * Introduce PSUTIL_TESTING env var ...so that we can make stricter assertions in C and py code during tests only. * define a C function in _common.c which returns whether the var is set * set PSUTIL_TESTING from the Makefile * cache psutil_testing() result * winmake: set PSUTIL_TESTING env var for tests
* #1040 users() / linux: fix unicodeGiampaolo Rodola2017-05-021-5/+22
|
* #1040 disk_partitions() / linux: fix unicodeGiampaolo Rodola2017-05-021-4/+16
|
* move psutil_pid_exists() and psutil_raise_for_pid() from _psutil_common.c to ↵Giampaolo Rodola2017-04-301-0/+2
| | | | _psutil_posix.c
* linux / c: small refactoringGiampaolo Rodola2017-04-271-2/+1
|
* #1022: fix users() on Linux; update doc; bump up versionGiampaolo Rodola2017-04-251-1/+1
|
* in psutil_users() move pid to the backAlexander Hasselhuhn2017-04-251-2/+2
|
* make users() include pid into suser tupleAlexander Hasselhuhn2017-04-251-1/+2
|
* Fix build with musl libcBaruch Siach2017-02-161-0/+2
| | | | | | | | | | | | | | | | | | | Suppress inclusion of linux/sysinfo.h to fix redefinition of struct sysinfo that musl libc defines in sys/sysinfo.h, which least to the following build failure (paths abbreviated): In file included from .../usr/include/linux/kernel.h:4:0, from .../usr/include/linux/ethtool.h:16, from psutil/_psutil_linux.c:35: .../usr/include/linux/sysinfo.h:7:8: error: redefinition of ‘struct sysinfo’ struct sysinfo { ^ In file included from psutil/_psutil_linux.c:21:0: .../usr/include/sys/sysinfo.h:10:8: note: originally defined here struct sysinfo { ^ Fixes #872
* refactor memleak script: get rid of no longer used logic to deal with ↵Giampaolo Rodola2016-10-281-1/+1
| | | | Process properties
* linux: separate IFFLAGS functionGiampaolo Rodola2016-10-251-18/+5
|
* share C function to retrieve MTU across all UNIXesGiampaolo Rodola2016-10-241-9/+2
|
* change wording when raising RuntimeError from C (add 'syscall' term)Giampaolo Rodola2016-10-051-1/+1
|
* issue #892: [Linux] Process.cpu_affinity([-1]) raise SystemError with no ↵Giampaolo Rodola2016-09-221-1/+5
| | | | error set; now ValueError is raised.
* Merge pull request #825 from hardikar/masterGiampaolo Rodola2016-09-221-4/+4
|\ | | | | Fix possible double close and use of unopened socket
| * Address PR commentsShreedhar Hardikar2016-06-141-3/+2
| |
| * Fix possible double close and use of unopened socketShreedhar Hardikar2016-05-241-4/+5
| |
* | remove useless .h filesGiampaolo Rodola2016-07-031-2/+0
|/
* fix #797: [Linux] net_if_stats() may raise OSError for certain NIC cards.Giampaolo Rodola2016-03-301-2/+5
|
* fix #776 / linux / cpu_affinity: set right C type for Py_ArgParseGiampaolo Rodola2016-02-241-2/+2
|
* #685 / linux / mem funcs: return original C types and use the multiplier in ↵Giampaolo Rodola2016-02-151-7/+9
| | | | python in order to avoid C typing issues
* Fixed call to Py_DECREF on possible Null objectTim Konick2016-02-021-1/+1
|
* move DUPLEX_UNKOWN fix outside of #if PSUTIL_HAVE_IOPRIOArnon Yaari2015-09-041-5/+6
| | | | this fixes the build on Centos 4.8
* C: var names -> add py_ prefixGiampaolo Rodola2015-09-031-35/+35
|
* fix python 3 compilation errorGiampaolo Rodola2015-08-301-2/+1
|
* #659: [Linux] compilation error on Suse 10. (patch by maozguttman)Giampaolo Rodola2015-08-301-1/+9
|
* fix #513: [Linux] fixed integer overflow for RLIM_INFINITY.Giampaolo Rodola2015-08-071-1/+14
|
* C stylingGiampaolo Rodola2015-08-061-8/+5
|
* C stylingGiampaolo Rodola2015-08-061-18/+9
|
* Fix #664 by compiling on musl libcBart van Kleef2015-08-041-1/+1
| | | See http://stackoverflow.com/questions/6381526/what-is-the-significance-of-caddr-t-and-when-is-it-used and https://github.com/metachris/RPIO/issues/40 for more details.
* #659: try to fix compilation err on suse 10Giampaolo Rodola2015-07-311-0/+1
|
* fix compilation warning about possible misuse of XDECREFArnon Yaari2015-03-151-2/+2
|
* fix #607: DUPLEX_UNKNOWN is not defined on old RedHat versionsGiampaolo Rodola2015-03-141-0/+6
|
* C styling: if unificationGiampaolo Rodola2015-03-011-33/+16
|
* #250: use int instead of PyObjectGiampaolo Rodola2015-02-121-8/+3
|