diff --git a/psutil/_psutil_osx.c b/psutil/_psutil_osx.c index 2cea8053e..7a0f73b01 100644 --- a/psutil/_psutil_osx.c +++ b/psutil/_psutil_osx.c @@ -1226,7 +1226,7 @@ psutil_proc_open_files(PyObject *self, PyObject *args) { free(fds_pointer); if (errno != 0) return PyErr_SetFromErrno(PyExc_OSError); - else if (! psutil_pid_exists(pid)) + else if (psutil_pid_exists(pid) == 0) return NoSuchProcess(); else return NULL; // exception has already been set earlier