Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(techStackGeneric): improve getProcNames (#250)
The `getProcNames` procedure was doing some strange things: - It was trying to read files at `/proc/foo/status`, where `foo` is the name of a file (not directory) in `/proc`. - It scanned each file at `/proc/[pid]/status` once per digit of its pid. This wasn't producing any incorrect results because: - It caught and ignored the exceptions from opening nonexistent files. - The names are added to a `HashSet[string]`, which deduplicates them. It was also doing some further unnecessary work: it kept scanning lines of `/proc/[pid]/status` even after it found the `Name` value (which is specified to be on the first line). This commit resolves those issues. Refs: #249
- Loading branch information