diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp index 5236793fb4..5afeae9461 100644 --- a/Userland/Applications/SystemMonitor/main.cpp +++ b/Userland/Applications/SystemMonitor/main.cpp @@ -87,8 +87,8 @@ private: static bool can_access_pid(pid_t pid) { - auto path = String::formatted("/proc/{}", pid); - return access(path.characters(), X_OK) == 0; + int rc = kill(pid, 0); + return rc == 0; } int main(int argc, char** argv)