From 8b0a7b9fb8377269866194e494d7b31dc395e3a3 Mon Sep 17 00:00:00 2001 From: Jarred SUmner Date: Thu, 29 Dec 2022 21:53:04 -0800 Subject: [PATCH] Set CLOXEC --- src/bun.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bun.zig b/src/bun.zig index f20843ee61..6e0cfc87e5 100644 --- a/src/bun.zig +++ b/src/bun.zig @@ -580,7 +580,7 @@ pub const DateTime = @import("./deps/zig-datetime/src/datetime.zig"); pub var start_time: i128 = 0; pub fn openDir(dir: std.fs.Dir, path_: [:0]const u8) !std.fs.IterableDir { - const fd = try std.os.openatZ(dir.fd, path_, std.os.O.DIRECTORY | 0, 0); + const fd = try std.os.openatZ(dir.fd, path_, std.os.O.DIRECTORY | std.os.O.CLOEXEC | 0, 0); return std.fs.IterableDir{ .dir = .{ .fd = fd } }; } pub const MimallocArena = @import("./mimalloc_arena.zig").Arena;