From 87445e6bd34de368ed4e41f755ceedecabd66e9e Mon Sep 17 00:00:00 2001 From: ShengYi Hung Date: Sun, 10 May 2026 18:52:05 +0800 Subject: [PATCH] fix: intercept pclose Add Pclose to the exposed symbols list so our pclose implementation is called. This fixes hardened_popen_after_unsetenv test on FreeBSD. --- intercept-preload/build.rs | 1 + platform-checks/build.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/intercept-preload/build.rs b/intercept-preload/build.rs index 4dfa4907..6213b575 100644 --- a/intercept-preload/build.rs +++ b/intercept-preload/build.rs @@ -16,6 +16,7 @@ const INTERCEPT_FAMILY: &[&str] = &[ "execl", "execlp", "execle", + "pclose", "posix_spawn", "posix_spawnp", "popen", diff --git a/platform-checks/build.rs b/platform-checks/build.rs index d6e14e77..a90eca09 100644 --- a/platform-checks/build.rs +++ b/platform-checks/build.rs @@ -44,6 +44,7 @@ const SYMBOL_PROBES: &[(&str, &str)] = &[ ("execlp", "unistd.h"), ("execle", "unistd.h"), ("posix_spawn", "spawn.h"), + ("pclose", "stdio.h"), ("posix_spawnp", "spawn.h"), ("popen", "stdio.h"), ("system", "stdlib.h"),