]> git.proxmox.com Git - pve-common.git/commitdiff
CpuSet write_to_cgroup: catch errors from close()
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 21 Dec 2016 07:56:06 +0000 (08:56 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 21 Dec 2016 07:56:06 +0000 (08:56 +0100)
src/PVE/CpuSet.pm

index 483405e194f2f35963a6480c7c049648d508ac85..9f76f385d27843282cc617167b751020d88539bd 100644 (file)
@@ -82,7 +82,7 @@ sub write_to_cgroup {
 
     open(my $fh, '>', $filename) || die "failed to open '$filename' - $!\n";
     PVE::Tools::safe_print($filename, $fh, "$value\n");
-    close($fh);
+    close($fh) || die "failed to close '$filename' - $!\n";
 }
 
 sub insert {