mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
add call to checkInterrupt
in a bunch of places
This brings back the old behaviour. We check for interrupts in places that may iterate over wide directories.
This commit is contained in:
parent
1623249745
commit
8f1a26667e
13 changed files with 29 additions and 3 deletions
|
@ -125,6 +125,7 @@ void closeMostFDs(const std::set<int> & exceptions)
|
|||
#if __linux__
|
||||
try {
|
||||
for (auto & s : std::filesystem::directory_iterator{"/proc/self/fd"}) {
|
||||
checkInterrupt();
|
||||
auto fd = std::stoi(s.path().filename());
|
||||
if (!exceptions.count(fd)) {
|
||||
debug("closing leaked FD %d", fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue