mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-09 19:36:45 +00:00
linux cgroup: fix initialization
This commit is contained in:
@@ -19,9 +19,7 @@ pub fn current(alloc: Allocator, pid: std.os.linux.pid_t) !?[]const u8 {
|
|||||||
defer file.close();
|
defer file.close();
|
||||||
|
|
||||||
// Read it all into memory -- we don't expect this file to ever be that large.
|
// Read it all into memory -- we don't expect this file to ever be that large.
|
||||||
var reader_buf: [4096]u8 = undefined;
|
const contents = try file.readToEndAlloc(
|
||||||
var reader = file.reader(&reader_buf);
|
|
||||||
const contents = try reader.interface.readAlloc(
|
|
||||||
alloc,
|
alloc,
|
||||||
1 * 1024 * 1024, // 1MB
|
1 * 1024 * 1024, // 1MB
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user