mirror of
https://github.com/NixOS/nix
synced 2025-07-06 13:21:47 +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
|
@ -1,4 +1,5 @@
|
|||
#include "cgroup.hh"
|
||||
#include "signals.hh"
|
||||
#include "util.hh"
|
||||
#include "file-system.hh"
|
||||
#include "finally.hh"
|
||||
|
@ -65,6 +66,7 @@ static CgroupStats destroyCgroup(const std::filesystem::path & cgroup, bool retu
|
|||
/* Otherwise, manually kill every process in the subcgroups and
|
||||
this cgroup. */
|
||||
for (auto & entry : std::filesystem::directory_iterator{cgroup}) {
|
||||
checkInterrupt();
|
||||
if (entry.symlink_status().type() != std::filesystem::file_type::directory) continue;
|
||||
destroyCgroup(cgroup / entry.path().filename(), false);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue