Skip to content
Merged
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion src/libpsl-native/src/getppid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
//!
pid_t GetPPid(pid_t pid)
{

#if defined (__APPLE__) && defined(__MACH__) || defined(__FreeBSD__)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roll this commit into previous?

const pid_t PIDUnknown = UINT_MAX;
struct kinfo_proc info;
size_t length = sizeof(struct kinfo_proc);
Expand All @@ -44,6 +44,7 @@ pid_t GetPPid(pid_t pid)
return info.kp_eproc.e_ppid;
#elif defined(__FreeBSD__)
return info.ki_ppid;
#endif
#else

return UINT_MAX;
Expand Down