Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/common/local_file_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ static string AdditionalProcessInfo(FileSystem &fs, pid_t pid) {
}

string process_name, process_owner;
// macOS >= 10.7 has PROC_PIDT_SHORTBSDINFO
#ifdef PROC_PIDT_SHORTBSDINFO
// try to find out more about the process holding the lock
struct proc_bsdshortinfo proc;
if (proc_pidinfo(pid, PROC_PIDT_SHORTBSDINFO, 0, &proc, PROC_PIDT_SHORTBSDINFO_SIZE) ==
Expand All @@ -199,6 +201,9 @@ static string AdditionalProcessInfo(FileSystem &fs, pid_t pid) {
process_owner = pw->pw_name;
}
}
#else
return string();
#endif
// try to get a better process name (full path)
char full_exec_path[PROC_PIDPATHINFO_MAXSIZE];
if (proc_pidpath(pid, full_exec_path, PROC_PIDPATHINFO_MAXSIZE) > 0) {
Expand Down