mirror of
https://github.com/NixOS/nix.git
synced 2025-11-12 13:36:02 +01:00
Replace our DirEntry with std::filesystem's
This commit is contained in:
parent
c371070580
commit
a3c573950b
18 changed files with 52 additions and 59 deletions
|
|
@ -125,7 +125,7 @@ void closeMostFDs(const std::set<int> & exceptions)
|
|||
#if __linux__
|
||||
try {
|
||||
for (auto & s : readDirectory("/proc/self/fd")) {
|
||||
auto fd = std::stoi(s.name);
|
||||
auto fd = std::stoi(s.path().filename());
|
||||
if (!exceptions.count(fd)) {
|
||||
debug("closing leaked FD %d", fd);
|
||||
close(fd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue