mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Do not set stack limit at runtime (#19405)
This commit is contained in:
13
src/fs.zig
13
src/fs.zig
@@ -810,19 +810,6 @@ pub const FileSystem = struct {
|
||||
return std.math.maxInt(usize);
|
||||
}
|
||||
|
||||
blk: {
|
||||
const resource = std.posix.rlimit_resource.STACK;
|
||||
const limit = try std.posix.getrlimit(resource);
|
||||
Limit.stack_before = limit;
|
||||
if (limit.cur < limit.max) {
|
||||
var new_limit = std.mem.zeroes(std.posix.rlimit);
|
||||
new_limit.cur = limit.max;
|
||||
new_limit.max = limit.max;
|
||||
|
||||
std.posix.setrlimit(resource, new_limit) catch break :blk;
|
||||
Limit.stack = limit.max;
|
||||
}
|
||||
}
|
||||
var file_limit: usize = 0;
|
||||
blk: {
|
||||
const resource = std.posix.rlimit_resource.NOFILE;
|
||||
|
||||
Reference in New Issue
Block a user