Skip to content

Commit

Permalink
Comment
Browse files Browse the repository at this point in the history
  • Loading branch information
adriansr committed May 27, 2019
1 parent 130a361 commit ca8679e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sigar_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ func (self *ProcState) Get(pid int) error {
errs = append(errs, errors.Wrap(err, "getParentPid failed"))
}

// getProcCredName will often fail when run as a non-admin user. This is
// caused by strict ACL of the process token belonging to other users.
// Instead of failing completely, ignore this error and still return most
// data with an empty Username.
self.Username, _ = getProcCredName(pid)

if len(errs) > 0 {
Expand Down

0 comments on commit ca8679e

Please sign in to comment.