You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That sysctl call is a little finicky, and will return a generic EINVAL error for three main cases:
It doesn't have permission
It's called against a zombie process
The PID no longer exists.
The error handling should better distinguish between these three cases. The logic will probably need to look something like this:
if EINVAL{
if not pidExists(pid) {
return "PID does not exist"
}
if our_UID() != root or our_UID() != pid.UID {
return "permission denied"
}
return "process is a zombie, skipping"
}
The text was updated successfully, but these errors were encountered:
This is in specific reference to the
KERN_PROCARGS2
sysctl
call that's made in this function:elastic-agent-system-metrics/metric/system/process/process_darwin.go
Line 154 in 2bd1d4b
That sysctl call is a little finicky, and will return a generic
EINVAL
error for three main cases:The error handling should better distinguish between these three cases. The logic will probably need to look something like this:
The text was updated successfully, but these errors were encountered: