osx: show uid instead of 'unknown' if no user exists with the same

Signed-off-by: thecoder-001 <ayush06feb@gmail.com>
This commit is contained in:
thecoder-001 2024-04-28 02:53:50 +05:30
parent 08f90fb4f0
commit 9a37395744
No known key found for this signature in database

View file

@ -1252,7 +1252,7 @@ namespace Proc {
if (pwd != nullptr) {
new_proc.user = pwd->pw_name;
} else {
new_proc.user = "unknown";
new_proc.user = std::to_string(kproc.kp_eproc.e_ucred.cr_uid);
Logger::warning("Could not retrieve user information for user ID:" + std::to_string(kproc.kp_eproc.e_ucred.cr_uid) + " (pid:" + std::to_string(pid) + ")");
}
}