Mercurial > minori
comparison dep/animia/src/fd/bsd.cc @ 148:aa4df5a84338
dep/animia: use std::pair instead of std::tuple
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Tue, 14 Nov 2023 13:27:13 -0500 |
| parents | d8a61e7e2a36 |
| children | ffa535b6d630 |
comparison
equal
deleted
inserted
replaced
| 147:6fdf0632c003 | 148:aa4df5a84338 |
|---|---|
| 82 return true; | 82 return true; |
| 83 #endif | 83 #endif |
| 84 } | 84 } |
| 85 | 85 |
| 86 /* this only works on OS X :( */ | 86 /* this only works on OS X :( */ |
| 87 bool UnixFdTools::EnumerateOpenFiles(const std::set<pid_t>& pids, std::vector<std::tuple<pid_t, std::string>>& files) { | 87 bool UnixFdTools::EnumerateOpenFiles(const std::set<pid_t>& pids, std::vector<std::pair<pid_t, std::string>>& files) { |
| 88 for (const auto& pid : pids) { | 88 for (const auto& pid : pids) { |
| 89 int bufsz = proc_pidinfo(pid, PROC_PIDLISTFDS, 0, NULL, 0); | 89 int bufsz = proc_pidinfo(pid, PROC_PIDLISTFDS, 0, NULL, 0); |
| 90 if (bufsz == -1) | 90 if (bufsz == -1) |
| 91 return false; | 91 return false; |
| 92 | 92 |
