mirror of
https://github.com/shirou/gopsutil.git
synced 2025-05-08 19:29:25 +08:00
Merge pull request #1041 from shirou/feature/erik-reduce-memory
[process][linux] apply #1033 to v3.
This commit is contained in:
commit
2d13269306
@ -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":
|
case "State":
|
||||||
p.status = convertStatusChar(value[0:1])
|
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":
|
case "PPid", "Ppid":
|
||||||
pval, err := strconv.ParseInt(value, 10, 32)
|
pval, err := strconv.ParseInt(value, 10, 32)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user