Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

"Executable names truncated #15" fix for darwin #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Backerich
Copy link

There is an issue with the linux and darwin executable names beeing truncated #15
This commit is only for the darwin side, the bug was due to kinfo_proc->kp_proc.p_comm only beeing able to hold 16 Chars
as it can be seen in sys/proc.h p_comm[MAXCOMLEN + 1] (MAXCOMLEN = 16)
The commit is using libproc.h to get the execution path and using filepath.Base to receive only the executable name from the path
Credit: The function getExePathFromPid is from here comes with a great explanation

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant