linux cgroup: fix initialization

pull/9043/head
Jeffrey C. Ollie 2025-10-05 20:44:52 -05:00
parent c5ea4a8079
commit a249b3da3a
No known key found for this signature in database
GPG Key ID: 1BB9EB7EA602265B
1 changed files with 1 additions and 3 deletions

View File

@ -19,9 +19,7 @@ pub fn current(alloc: Allocator, pid: std.os.linux.pid_t) !?[]const u8 {
defer file.close();
// 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
);