cache of known pids: update lastSeen field when we have a match

This commit is contained in:
Gustavo Iñiguez Goia 2020-03-04 01:31:36 +01:00
parent 3d6beb5ec3
commit 7ef15faf62

View file

@ -113,6 +113,7 @@ func getPidFromCache(inode int, inodeKey string, expect string) (int, int) {
pidsCache[n].Descriptors = descriptors
if idxDesc := getPidDescriptorsFromCache(procEntry.Pid, procEntry.FdPath, expect, descriptors); idxDesc != -1 {
pidsCache[n].Time = time.Now()
return procEntry.Pid, n
}
}