(fdList []os.FileInfo)
| 9 | ) |
| 10 | |
| 11 | func 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, |
no outgoing calls
no test coverage detected