summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2020-11-10 20:51:59 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2020-11-10 20:51:59 +0100
commit2f24fc88a944f2227e7fbad8e90e2396a7a8189a (patch)
treed7e34e176731238db99e55c619b6434c92f66e54
parent366ee330dcf7b522bee28f32c8d4046c032e9b33 (diff)
downloadpsutil-2f24fc88a944f2227e7fbad8e90e2396a7a8189a.tar.gz
add debug info
-rw-r--r--.github/workflows/build_wheel.yml2
-rw-r--r--psutil/arch/osx/process_info.c10
2 files changed, 10 insertions, 2 deletions
diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml
index 43e014e4..e95c70b8 100644
--- a/.github/workflows/build_wheel.yml
+++ b/.github/workflows/build_wheel.yml
@@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false # whether to exit the whole run on first failure
matrix:
- os: [macos-latest]
+ os: [macos-latest, ubuntu-latest]
env:
CIBW_TEST_COMMAND: python -u -Wa {project}/psutil/tests/runner.py
CIBW_TEST_COMMAND_MACOS: LC_ALL='en_US.utf8' python -Wa {project}/psutil/tests/runner.py
diff --git a/psutil/arch/osx/process_info.c b/psutil/arch/osx/process_info.c
index d7a5b854..3341a5f3 100644
--- a/psutil/arch/osx/process_info.c
+++ b/psutil/arch/osx/process_info.c
@@ -159,8 +159,12 @@ psutil_get_cmdline(pid_t pid) {
// to NSP and _psosx.py will translate it to ZP.
if ((errno == EINVAL) && (psutil_pid_exists(pid)))
NoSuchProcess("sysctl");
+ else if (errno == EIO) {
+ psutil_debug("EIO, pid_exists() = %i\n", psutil_pid_exists(pid));
+ PyErr_SetFromOSErrnoWithSyscall("sysctl(KERN_PROCARGS2)");
+ }
else
- PyErr_SetFromErrno(PyExc_OSError);
+ PyErr_SetFromOSErrnoWithSyscall("sysctl(KERN_PROCARGS2)");
goto error;
}
@@ -251,6 +255,10 @@ psutil_get_environ(pid_t pid) {
// to NSP and _psosx.py will translate it to ZP.
if ((errno == EINVAL) && (psutil_pid_exists(pid)))
NoSuchProcess("sysctl");
+ else if (errno == EIO) {
+ psutil_debug("EIO, pid_exists() = %i\n", psutil_pid_exists(pid));
+ PyErr_SetFromOSErrnoWithSyscall("sysctl(KERN_PROCARGS2)");
+ }
else
PyErr_SetFromOSErrnoWithSyscall("sysctl(KERN_PROCARGS2)");
goto error;