Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MINOR: kern_procargs more robut on darwin
Under some circonstance the code can fail, the root cause is not clear at the moment, but we should still make the code more robust when retrieving information for a specific process. The problem is the `bytes.SplitN` can return an array of one element making the process panic when we access the other element. This commit make the code a bit more robust and check to make sure we successfully retrieved 2 elements instead of one and return an error if it failed. Reference: elastic/beats#5337
- Loading branch information