MCPcopy
hub / github.com/evilsocket/opensnitch / sortPidsByTime

Function sortPidsByTime

daemon/procmon/find.go:11–18  ·  view source on GitHub ↗
(fdList []os.FileInfo)

Source from the content-addressed store, hash-verified

9)
10
11func sortPidsByTime(fdList []os.FileInfo) []os.FileInfo {
12 sort.Slice(fdList, func(i, j int) bool {
13 t := fdList[i].ModTime().UnixNano()
14 u := fdList[j].ModTime().UnixNano()
15 return t > u
16 })
17 return fdList
18}
19
20// inodeFound searches for the given inode in /proc/<pid>/fd/ or
21// /proc/<pid>/task/<tid>/fd/ and gets the symbolink link it points to,

Callers 2

lookupPidDescriptorsFunction · 0.85
getProcPidsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected