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

[receiver/hostmetrics] Change method to get parent Pid in function parentPid #22920

Merged
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
Prev Previous commit
Next Next commit
refactor - remove if
  • Loading branch information
JadziaMataj committed Jun 1, 2023
commit 67ffb0f2c3b750674a123cc4f188e7033c70c07f
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,5 @@ func parentPid(handle processHandle, pid int32) (int32, error) {
}
pPid, err := handle.Ppid()

if err != nil {
// return pid of -1 along with error for all other problems retrieving parent pid
return pPid, err
}

return pPid, nil
return pPid, err
}