Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant