From 79ced2767a5ff33352e4d6372a32b9308fa281e2 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Wed, 27 Mar 2024 19:16:23 -0700 Subject: [PATCH] Let's try calling close_range CLOSE_RANGE_CLOEXEC starting on 4 instead of 0 --- src/bun.js/bindings/c-bindings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bun.js/bindings/c-bindings.cpp b/src/bun.js/bindings/c-bindings.cpp index f77f9e6bb5..6526c9eb31 100644 --- a/src/bun.js/bindings/c-bindings.cpp +++ b/src/bun.js/bindings/c-bindings.cpp @@ -409,7 +409,7 @@ extern "C" void bun_initialize_process() // This is less of an issue for macOS due to posix_spawn // This is best effort, not all linux kernels support close_range or CLOSE_RANGE_CLOEXEC // To avoid breaking --watch, we skip stdin, stdout, stderr and IPC. - bun_close_range(0, ~0U, CLOSE_RANGE_CLOEXEC); + bun_close_range(4, ~0U, CLOSE_RANGE_CLOEXEC); #endif #if OS(LINUX) || OS(DARWIN)