X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=src%2FPVE%2FLXC%2FCGroup.pm;h=d6b27ea07d903518b132c8841a0cd5124f808aad;hb=53e131d329e844b74fb285d566c0e2527c1c3d6e;hp=5db1d486b7288d48f2ff2e932b6d7e7652db9a73;hpb=89424a8b32ce3836a5be7e60c8f2ac7f756d4c4c;p=pve-container.git diff --git a/src/PVE/LXC/CGroup.pm b/src/PVE/LXC/CGroup.pm index 5db1d48..d6b27ea 100644 --- a/src/PVE/LXC/CGroup.pm +++ b/src/PVE/LXC/CGroup.pm @@ -546,18 +546,16 @@ my sub v2_freeze_thaw { PVE::ProcFSTools::write_proc_entry("$path/cgroup.freeze", $desired_state); while (1) { - my @handles = $select->can_read(); - next if !@handles; - open(my $dup, '<&', $fh) - or die "failed to reopen cgroup.events file: $!\n"; - seek($dup, 0, 0) - or die "failed to rewind cgroup.events file: $!\n"; my $data = do { local $/ = undef; - <$dup> + <$fh> }; $data = parse_flat_keyed_file($data); last if $data->{frozen} == $desired_state; + my @handles = $select->has_exception(); + next if !@handles; + seek($fh, 0, 0) + or die "failed to rewind cgroup.events file: $!\n"; } }