mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
parent
cd62005f19
commit
6b2899df2a
1 changed files with 5 additions and 1 deletions
|
|
@ -5985,8 +5985,12 @@ fn parseCodeModel(arg: []const u8) std.builtin.CodeModel {
|
|||
/// garbage collector to run concurrently to zig processes, and to allow multiple
|
||||
/// zig processes to run concurrently with each other, without clobbering each other.
|
||||
fn gimmeMoreOfThoseSweetSweetFileDescriptors() void {
|
||||
const have_rlimit = switch (builtin.os.tag) {
|
||||
.windows, .wasi => false,
|
||||
else => true,
|
||||
};
|
||||
if (!have_rlimit) return;
|
||||
const posix = std.posix;
|
||||
if (!@hasDecl(posix, "rlimit")) return;
|
||||
|
||||
var lim = posix.getrlimit(.NOFILE) catch return; // Oh well; we tried.
|
||||
if (comptime builtin.target.isDarwin()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue