summaryrefslogtreecommitdiff
path: root/psutil/_psutil_bsd.c
Commit message (Collapse)AuthorAgeFilesLines
* Properly handle PID type in C (#1672)Giampaolo Rodola2020-01-291-23/+40
|
* OpenBSD fixes (#1673)Giampaolo Rodola2020-01-271-11/+3
|
* get rid of globals.c; move stuff in _psutil_common.cGiampaolo Rodola2020-01-061-5/+1
|
* Fix Process on FreeBSD 12.0+ i386 (#1646)Po-Chuan Hsieh2019-12-211-1/+5
| | | | | FreeBSD 12.0+ change ki_tdev from 32 bits to 64 bits. Reference: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242543
* release gil around users()/BSD (#1425)Giampaolo Rodola2019-11-201-0/+2
|
* Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616)Riccardo Schirone2019-11-131-15/+15
| | | | | | | | | | | | | | 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.
* Fix _psutil_bsd.c compile error on OpenBSD (#1619)Nathan Houghton2019-11-121-1/+1
|
* Refactor C modules init (#1603)Giampaolo Rodola2019-10-211-87/+76
|
* Implement psutil_proc_cwd for NetBSD (#1530)Kamil Rytarowski2019-06-121-1/+1
| | | | Pick KERN_PROC_CWD that is available in 8.99.43 and fallback for older versions to readlink("/proc/$PID/cwd").
* NetBSD fixes (#1526)Kamil Rytarowski2019-06-111-0/+2
| | | | | | | | | | | | | | | | | | | * Fix psutil_get_cmd_args() for NetBSD Do not overallocate the buffer prompting for KERN_ARGMAX. It also fixes the code as KERN_ARGMAX was received into a size_t type, while kernel returned int. It caused argmax to contain garbage and allocation was randomly crashing with new jemalloc in the basesystem. New code prompts for exact buffer size before allocation and stores argv[] inside it. Bug investigated by Leonardo Taccari. * Stop including sys/user.h for NetBSD This header was removed from the OS as it was empty.
* #1411 / BSD / Process() init: use Py_INCREF() around process name pyobj and ↵Giampaolo Rodola2019-02-251-4/+2
| | | | avoid segfault
* #1428 in case of error, show the C syscall which caused itGiampaolo Rodola2019-02-241-1/+1
|
* Add CPU frequency support for FreeBSD (#1369)Alex Manuskin2018-12-011-0/+2
| | | | Add CPU frequency support for FreeBSD (patch by @amanusk)
* FreeBSD adding temperature sensors (WIP) (#1350)Alex Manuskin2018-11-031-0/+2
| | | FreeBSD: add temperature sensors
* Rename OSX to macOS (#1298)Giampaolo Rodola2018-06-261-1/+1
| | | rename OSX to macOS
* 1173 debug mode (#1176)Giampaolo Rodola2017-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | * implement PSUTIL_DEBUG from C module * update doc * add psutil_debug() utility function * update doc * enable PSUTIL_DEBUG for tests * update appveyor.yml * change psutil_debug() signature so that it can accept variable num of args * provide DEBUG info in psutil_raise_for_pid() * properly print debug message * do not print too much
* 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
|
* 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
* 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
* Freebsd socks refactoring (#1073)Giampaolo Rodola2017-05-161-1/+2
| | | | | | | | * freebsd: split socks.c into 2 separate files * remove unused h files * freebsd: split socks.c into 2 separate files
* BSD: mv arch C files (#1072)Giampaolo Rodola2017-05-161-5/+5
| | | | | | | | | | * move freebsd C arch files * rename C file * move openbsd C arch files * move netbsd C arch files
* fix #1069 / freebsd: cpu_num() may return 255; now returns -1Giampaolo Rodola2017-05-141-3/+4
|
* fix #1065: cmdline() on OpenBSD may raise SystemError; also set a limit of ↵Giampaolo Rodola2017-05-131-5/+2
| | | | retries to realloc() the space to store the cmdline to max 8k so that it won't loop forever
* fix failing tests on netbsdGiampaolo Rodola2017-05-131-1/+0
|
* refactor ifdefsGiampaolo Rodola2017-05-121-6/+2
|
* fix compilation err on netbsdGiampaolo Rodola2017-05-121-3/+3
|
* freebsd: fix memory leak in open_files()Giampaolo Rodola2017-05-121-3/+3
|
* broken links: also inspect C and H filesGiampaolo Rodola2017-05-121-5/+5
|
* merge from masterGiampaolo Rodola2017-05-021-1/+9
|\
| * #1022 / users(): PID cannot be determined on OpenBSD so we set it to NoneGiampaolo Rodola2017-05-011-1/+9
| |
* | #1040: add replacement for PyUnicode_DecodeFSDefaultAndSize on Python 2; ↵Giampaolo Rodola2017-05-011-11/+11
| | | | | | | | also get rid of the pstuil_ prefix and use the original Python names
* | #1040 / unicode / bsd: fix unicode handling for users()Giampaolo Rodola2017-05-011-10/+39
| |
* | #1040 / unicode / bsd: fix unicode handling for disk_partitions()Giampaolo Rodola2017-05-011-3/+15
| |
* | #1040 / unicode / freebsd: fix decode handling for memory_maps() and ↵Giampaolo Rodola2017-05-011-1/+6
| | | | | | | | open_files()
* | #1040: provide an alias for PyUnicode_DecodeFSDefault which is not ↵Giampaolo Rodola2017-05-011-11/+2
|/ | | | available on Python 2; also start to port the first C functions in FreeBSD
* move psutil_pid_exists() and psutil_raise_for_pid() from _psutil_common.c to ↵Giampaolo Rodola2017-04-301-0/+1
| | | | _psutil_posix.c
* C / BSD: refactor open_files() codeGiampaolo Rodola2017-04-281-14/+21
|
* freebsd / c: small refactoringGiampaolo Rodola2017-04-271-9/+4
|
* 1022: fix users() on freebsdGiampaolo Rodola2017-04-271-2/+3
|
* in psutil_users() move pid to the backAlexander Hasselhuhn2017-04-251-1/+2
|
* make users() include pid into suser tupleAlexander Hasselhuhn2017-04-251-2/+3
|
* #955: sensors_batter() freebsd implGiampaolo Rodola2017-01-261-0/+4
|
* merge from masterGiampaolo Rodola2017-01-231-56/+53
|\
| * refactor C macrosGiampaolo Rodola2016-12-201-22/+17
| |
| * refactor C macrosGiampaolo Rodola2016-12-201-45/+45
| |
* | #357: does not support cpu_num() on Net and Open BSDGiampaolo Rodola2016-11-261-0/+8
| |
* | #357: implement process cpu_num() on FreeBSDGiampaolo Rodola2016-11-251-3/+14
|/
* Merge branch 'master' into oneshotGiampaolo Rodola2016-10-271-1/+3
|\
| * netbsd / connections: refactoringGiampaolo Rodola2016-10-261-1/+3
| |