use full cmdline in case of proc renaming

This commit is contained in:
Aleksandr Balezin 2018-06-23 17:17:39 +03:00
parent a9c2f23bc2
commit e2c79a1af7
1 changed files with 2 additions and 0 deletions

View File

@ -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]
}
}
}