From 45a01f678c2b4556900cdb24e7a1a389a56c461b Mon Sep 17 00:00:00 2001 From: xuyang2 Date: Thu, 12 Aug 2021 11:06:28 +0800 Subject: [PATCH] [process][linux] get name from /proc/(pid)/comm --- v3/process/process_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v3/process/process_linux.go b/v3/process/process_linux.go index 87b8904..90f61e9 100644 --- a/v3/process/process_linux.go +++ b/v3/process/process_linux.go @@ -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 }