From d9de5909d9b3f95c3a91ed008d2246eb1aebcd99 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Sun, 5 Oct 2025 20:55:12 -0500 Subject: [PATCH] linux cgroup: also fix controllers() This fix was found by Claude Code, but I manually reviewed this change and removed extraneous changes made by the AI tool. Co-authored-by: moderation --- src/os/cgroup.zig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/os/cgroup.zig b/src/os/cgroup.zig index 761386a2f..4b5ccc4d3 100644 --- a/src/os/cgroup.zig +++ b/src/os/cgroup.zig @@ -185,9 +185,7 @@ pub fn controllers(alloc: Allocator, cgroup: []const u8) ![]const u8 { // Read it all into memory -- we don't expect this file to ever // be that large. - var reader_buf: [4096]u8 = undefined; - var reader = file.reader(&reader_buf); - const contents = try reader.interface.readAlloc( + const contents = try file.readToEndAlloc( alloc, 1 * 1024 * 1024, // 1MB );