summaryrefslogtreecommitdiff
path: root/psutil/_psutil_sunos.c
Commit message (Collapse)AuthorAgeFilesLines
* SunOS: fix some C compilation warningsGiampaolo Rodola2023-04-221-2/+2
| | | | Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* [POSIX] psutil.users() loses precision for "started" attribute #2225 (#2226)Giampaolo Rodola2023-04-111-2/+2
|
* Fix typosKian-Meng Ang2022-01-271-3/+3
|
* Remove docstrings from C function definitions (#2058)Giampaolo Rodola2022-01-161-42/+21
|
* PSUTIL_DEBUG: print file + line number for C ext modules (#2005)Giampaolo Rodola2021-10-261-2/+2
|
* Rename cpu_count_physical() to cpu_count_cores()Giampaolo Rodola2020-12-211-4/+4
| | | | | | | | | | This has always been cause of confusion, e.g. see: https://github.com/giampaolo/psutil/pull/1727#issuecomment-698934643 Removed the reference to "physical" from dostrings, functions and test. I still left it in the doc though, as it's more explanatory. Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
* add strncpy / PSUTIL_STRNCPY variant which adds null terminator (fix gcc-9 ↵Giampaolo Rodola2020-05-161-2/+2
| | | | warning)
* Add C linter script (#1698)Giampaolo Rodola2020-02-181-1/+1
|
* print/set syscall origin when raising NSP or ADGiampaolo Rodola2020-01-141-1/+1
|
* [Solaris] Fix #1637 (#1638)vser12019-12-171-4/+15
|
* Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616)Riccardo Schirone2019-11-131-22/+21
| | | | | | | | | | | | | | 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 variable declaration (#1607)vser12019-11-041-2/+2
| | | | | In plain old C, variables shall be declared above Fix #1606
* Fix spurious exception when iterating processes on Solaris (#1471)Daniel Beer2019-04-021-1/+3
|
* expose WINVER constants in the cext moduleGiampaolo Rodola2019-02-251-2/+6
|
* Fix https://github.com/giampaolo/psutil/issues/1346 (#1347)alxchk2018-10-111-1/+4
|
* Solaris 10 Fixes (#1248)Georg Sauthoff2018-03-171-88/+86
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* Try to extract argv[] from process address space first (#1220)alxchk2018-03-111-1/+82
| | | | | | | | * Try to extract argv[] from process address space first * Add comments and OOM exception * Handle the case with empty array
* Arguments for NoSuchProcess and AccessDenied for the C ext (#1180)Giampaolo Rodola2017-11-241-1/+1
| | | | | | * change NoSuchProcess and AccessDenied C exceptions signatures * fix arg call on win
* 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
* AIX: implement num_ctx_switches (#1164)wiggin152017-10-311-1/+1
| | | | | | * small changes * AIX: implement num_ctx_switches
* Solaris: Use the correct set/get/end functions for utmp (#1130)wiggin152017-09-261-8/+8
| | | | boot_time() and users() use utmp (getutxent), but don't call "set" and don't use the correct "end" variant (for utmpx)
* Solaris: fix compilation warnings (#1131)wiggin152017-09-251-12/+12
|
* Fix 1091 nitpicks (#1097)Giampaolo Rodola2017-05-281-12/+15
| | | | | | | | | | | | | | | | | | | | | | * rename C module * rename C file * fix compilation error * small refactoring * small refactoring * raise AccessDenied if info.pr_envp is empty, see https://github.com/giampaolo/psutil/pull/1091#issuecomment-304530771 * fix envs with no equal sign * style * update doc * style
* Add environment parsing (#1091)Oleksii Shevchuk2017-05-211-0/+76
| | | | | | * Add common functions to extract information from SunOS process address space * SunOS feature: Add .environ()
* SunOS: Fix .memory_maps(grouped=False) (#1093)Oleksii Shevchuk2017-05-201-6/+6
|
* PSUTIL_TESTING env var (#1083)Giampaolo Rodola2017-05-181-1/+4
| | | | | | | | | | | | | | * 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
* add notes about #1082Giampaolo Rodola2017-05-181-10/+13
|
* give CREDITS to @alxchk; update HISTORYGiampaolo Rodola2017-05-181-4/+4
|
* Fix https://github.com/giampaolo/psutil/issues/1077 (#1081)Oleksii Shevchuk2017-05-181-20/+40
|
* declare PSUTIL_CONN_NONE as a static shared constantGiampaolo Rodola2017-05-161-2/+0
|
* broken links: also inspect C and H filesGiampaolo Rodola2017-05-121-2/+2
|
* fix memleakGiampaolo Rodola2017-05-021-2/+8
|
* #1040 / memory_maps() / sunos: fix unicodeGiampaolo Rodola2017-05-021-3/+9
|
* fix typeGiampaolo Rodola2017-05-021-1/+1
|
* #1040 / disk_partitions() / sunos: fix unicodeGiampaolo Rodola2017-05-021-5/+16
|
* #1040 / users() / sunos: fix unicodeGiampaolo Rodola2017-05-021-3/+21
|
* #1040: remove dead unicode C codeGiampaolo Rodola2017-05-021-6/+8
|
* move psutil_pid_exists() and psutil_raise_for_pid() from _psutil_common.c to ↵Giampaolo Rodola2017-04-301-0/+2
| | | | _psutil_posix.c
* #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/+3
|
* make users() include pid into suser tupleAlexander Hasselhuhn2017-04-251-1/+2
|
* remove use of MA_RESERVED1 from SunOS moduleDanek Duvall2017-03-281-3/+1
| | | | | | | | | | MA_RESERVED1 never meant anything, and the macro is going away in the next release of Solaris. MA_NORESERVE wasn't really mapped to anything useful, either. Removing the use of both macros shouldn't make any material difference, and will be compatible across more versions of Solaris. Fixes #1002.
* #357: implement proc cpu_num() on SunOSGiampaolo Rodola2017-01-241-0/+82
|
* change wording when raising RuntimeError from C (add 'syscall' term)Giampaolo Rodola2016-10-051-1/+2
|
* #857: raise OSError instead of RuntimeError in case read() syscall failsGiampaolo Rodola2016-08-051-1/+1
|
* remove useless .h filesGiampaolo Rodola2016-07-031-2/+0
|
* #792 / cpu_stats: sunos implGiampaolo Rodola2016-02-021-0/+46
|
* #779 / proc cpu times: sunos implGiampaolo Rodola2016-02-021-3/+7
|