From 24895f02253b0c718b46897215156900ae9e36d3 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 25 Oct 2023 12:00:44 +0530 Subject: [PATCH] ... --- kitty/macos_process_info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/macos_process_info.c b/kitty/macos_process_info.c index ca0b96e26..aa65a2e61 100644 --- a/kitty/macos_process_info.c +++ b/kitty/macos_process_info.c @@ -96,7 +96,7 @@ cmdline_of_process(PyObject *self UNUSED, PyObject *pid_) { if (sysctl(mib, 3, procargs, &argmax, NULL, 0) < 0) { // In case of zombie process or non-existent process we'll get EINVAL. if (errno == EINVAL) - PyErr_Format(PyExc_ValueError, "process with pid %ld either does not exist or is a zombie", pid); + PyErr_Format(PyExc_ValueError, "process with pid %ld either does not exist or is a zombie or you dont have permission", pid); else PyErr_SetFromErrno(PyExc_OSError); goto error; @@ -193,7 +193,7 @@ environ_of_process(PyObject *self UNUSED, PyObject *pid_) { // In case of zombie process or a non-existent process we'll get EINVAL // to NSP and _psosx.py will translate it to ZP. if (errno == EINVAL) - PyErr_Format(PyExc_ValueError, "process with pid %ld either does not exist or is a zombie", pid); + PyErr_Format(PyExc_ValueError, "process with pid %ld either does not exist or is a zombie or you dont have permission", pid); else PyErr_SetFromErrno(PyExc_OSError); goto error;