[process][linux] get name from /proc/(pid)/comm

This commit is contained in:
xuyang2 2021-08-12 11:06:28 +08:00
parent 7485c8041d
commit 45a01f678c
1 changed files with 1 additions and 1 deletions

View File

@ -818,7 +818,7 @@ func (p *Process) fillFromCommWithContext(ctx context.Context) error {
return err
}
p.name = strings.TrimRight(string(contents), "\n")
p.name = strings.TrimSuffix(string(contents), "\n")
return nil
}