summaryrefslogtreecommitdiff
path: root/psutil/_psutil_common.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix typosKian-Meng Ang2022-01-271-1/+1
|
* give credits to @odormond for #1956 and #2011Giampaolo Rodola2021-11-101-2/+0
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* [macOS / M1] cpu_times(): convert mach tick units to nsecs (fixes #1956) (PR ↵Olivier Dormond2021-11-101-0/+13
| | | | | #2011) Signed-off-by: Olivier Dormond <olivier.dormond@pix4d.com>
* c / win: get rid of psutil_load_globals() and move it into psutil_setup() funGiampaolo Rodola2021-11-041-28/+19
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* PSUTIL_DEBUG: print file + line number for C ext modules (#2005)Giampaolo Rodola2021-10-261-28/+17
|
* windows: Preserve GetLastError() value before calling sprintf (#1904)alxchk2021-01-081-1/+2
| | | https://github.com/giampaolo/psutil/issues/1877#issuecomment-756342272
* [Windows] #1877: turn OpenProcess -> ERROR_SUCCESS into AD or NSP (#1887)Giampaolo Rodola2020-12-141-2/+2
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* Remove Travis and Cirrus, use GH also for FreeBSD (#1880)Giampaolo Rodola2020-11-151-0/+1
|
* [Windows] add support for pypy2 on windows (#1872)Giampaolo Rodola2020-11-101-4/+13
|
* Fix py 3.9 [WinError 998] Invalid access to memory location (#1866)Giampaolo Rodola2020-10-311-7/+0
|
* Implement Process.environ() on *BSD family (#1800) (patch by Armin Gruner)Armin Gruner2020-08-131-0/+20
|
* Add support for Windows Nano Server (#1768)Julien Lebot2020-07-051-4/+7
|
* Git hook for renamed/added/deleted files + flake8 print() + tidelift (#1704)Giampaolo Rodola2020-02-211-1/+0
|
* [Windows] increase precision of boot_time() and proc create_time() (#1693)Giampaolo Rodola2020-02-131-0/+38
|
* refactoringGiampaolo Rodola2020-02-121-39/+45
|
* fix pypy on LinuxGiampaolo Rodola2020-02-121-43/+39
|
* Add support for PyPy on Windows (#1686)Giampaolo Rodola2020-02-111-6/+42
|
* small C refactoringGiampaolo Rodola2020-02-011-19/+0
|
* Properly handle PID type in C (#1672)Giampaolo Rodola2020-01-291-1/+1
|
* print/set syscall origin when raising NSP or ADGiampaolo Rodola2020-01-141-10/+14
|
* #1652: remove win XP code path checking avilability of GetTickCount64Giampaolo Rodola2020-01-111-6/+8
|
* [Windows] rewrite of open_files() (#1660)Giampaolo Rodola2020-01-091-11/+4
|
* get rid of globals.c; move stuff in _psutil_common.cGiampaolo Rodola2020-01-061-5/+203
|
* just move stuff aroundGiampaolo Rodola2020-01-061-19/+36
|
* [Win] return value is not properly handled for undocumented NT* Windows ↵Giampaolo Rodola2019-04-041-1/+1
| | | | APIs. (#1477)
* fix compiler warningsGiampaolo Rodola2019-02-251-1/+3
|
* expose WINVER constants in the cext moduleGiampaolo Rodola2019-02-251-2/+3
|
* #1428 in case of error, show the C syscall which caused itGiampaolo Rodola2019-02-241-2/+25
|
* make psutil_debug() aware of PSUTIL_DEBUG (#1332)yanok2018-08-291-5/+7
| | | Fixes #1331
* 771 Windows CPU count (#1257)Giampaolo Rodola2018-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * use GetLogicalProcessorInformation() to get logical cpu_count() * return None if cpu_count() is undetermined + add mock test * style * factor out logical CPU num fun * remove unused code * psutil_get_num_cpus(): provide an option to fail on err * add comments * reuse get_num_cpus() function * error out if get_num_cpus() fail * use GetLogicalProcessorInformationEx to get phys CPU num * on win vista/xp just return None for phys CPU count * rename vars * fix C compiler warnings + remove mingw workarounds * return None if phys cpu count cant' be determined; update HISTORY * update HISTORY * update doc * add WMI tests * refactor tests * print debug msg for cpu phys returning None on win < 7 * try to fix win test * appveyor debug * fix typo * adjust appveyor 64 bit versions * debug msg * fix for loop * re-enable python versions * (maybe) finally fix GetLogicalProcessorInformationEx return len
* Solaris 10 Fixes (#1248)Georg Sauthoff2018-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Fix nice() for realtime processes under Solaris 10 fixes #1194 * Use psinfo as fallback [gu]id source on Solaris 10 fixes #1193 * Fix double free * Match ssize_t return type of read functions * Fix undefined behavior with respect to strict aliasing rules and fix some warnings For example, under strict aliasing rules of the C standard, casting a char pointer to a struct pointer and accessing the character array through that struct pointer yields undefined behavior. * Update HISTORY with Solaris notes
* Arguments for NoSuchProcess and AccessDenied for the C ext (#1180)Giampaolo Rodola2017-11-241-6/+8
| | | | | | * change NoSuchProcess and AccessDenied C exceptions signatures * fix arg call on win
* 1173 debug mode (#1176)Giampaolo Rodola2017-11-141-0/+17
| | | | | | | | | | | | | | | | | | | | | | * 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
* use a C global variable to figure out whether we're in testing modeGiampaolo Rodola2017-11-121-17/+8
|
* define a setup() function which is called on import by all C modulesGiampaolo Rodola2017-11-121-7/+11
|
* move PyUnicode compt fun definition up in the fileGiampaolo Rodola2017-11-121-20/+21
|
* rename C funcGiampaolo Rodola2017-11-121-1/+1
|
* re-enable test on appveyor; remove unused C codeGiampaolo Rodola2017-11-121-12/+0
|
* refactor PSUTIL_TESTING C APIsGiampaolo Rodola2017-11-121-2/+2
|
* inspect PSUTIL_TESTING env var from C againGiampaolo Rodola2017-11-121-3/+15
|
* get rid of PSUTIL_TESTING env var: it must be necessarily set from cmdline, ↵psutil-test-flagGiampaolo Rodola2017-11-111-8/+10
| | | | hence 'python -m psutil.tests' won't work out of the box
* PSUTIL_TESTING env var (#1083)Giampaolo Rodola2017-05-181-0/+31
| | | | | | | | | | | | | | * 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
* fix travisGiampaolo Rodola2017-05-181-1/+2
|
* #1040: add replacement for PyUnicode_DecodeFSDefaultAndSize on Python 2; ↵Giampaolo Rodola2017-05-011-15/+8
| | | | also get rid of the pstuil_ prefix and use the original Python names
* #1040: add alias for psutil_PyUnicode_DecodeFSDefaultAndSizeGiampaolo Rodola2017-05-011-0/+10
|
* #1040: provide an alias for PyUnicode_DecodeFSDefault which is not ↵Giampaolo Rodola2017-05-011-0/+16
| | | | 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-90/+0
| | | | _psutil_posix.c
* #916: [OSX] fix many compilation warnings.Giampaolo Rodola2016-10-121-0/+5
|
* update commentsGiampaolo Rodola2016-10-051-6/+15
|
* C pid_exists(): only FreeBSD has not PID 0Giampaolo Rodola2016-10-051-4/+2
|