From e2c79a1af7f8c87c2371fa5f1334a93172af8095 Mon Sep 17 00:00:00 2001 From: Aleksandr Balezin Date: Sat, 23 Jun 2018 17:17:39 +0300 Subject: [PATCH] use full cmdline in case of proc renaming --- process/process_linux.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/process/process_linux.go b/process/process_linux.go index 341420bcf..670817350 100644 --- a/process/process_linux.go +++ b/process/process_linux.go @@ -985,6 +985,8 @@ func (p *Process) fillFromStatusWithContext(ctx context.Context) error { extendedName := filepath.Base(cmdlineSlice[0]) if strings.HasPrefix(extendedName, p.name) { p.name = extendedName + } else { + p.name = cmdlineSlice[0] } } }