Merge pull request #1041 from shirou/feature/erik-reduce-memory

[process][linux] apply #1033 to v3.
tags/v3.21.2 v3.21.2
shirou 4 years ago committed by GitHub
commit 2d13269306
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -816,8 +816,12 @@ func (p *Process) fillFromStatusWithContext(ctx context.Context) error {
}
}
}
// Ensure we have a copy and not reference into slice
p.name = string([]byte(p.name))
case "State":
p.status = convertStatusChar(value[0:1])
// Ensure we have a copy and not reference into slice
p.status = string([]byte(p.status))
case "PPid", "Ppid":
pval, err := strconv.ParseInt(value, 10, 32)
if err != nil {

Loading…
Cancel
Save