From b995576b3a3fe0e45dbfa727fcebf6fcc4062cae Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Mon, 15 Jan 2024 13:05:23 +0100 Subject: [PATCH] posix_spawn: always compute envp posix_spawn doesn't inherit any env, so we need to always pass it all. --- process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/process.c b/process.c index 500a2df47e5fb3..54e5edd48fd310 100644 --- a/process.c +++ b/process.c @@ -372,6 +372,8 @@ static rb_pid_t cached_pid; #define execv(path, argv) (rb_async_bug_errno("unreachable: async-signal-unsafe execv() is called", 0)) #define execl(path, arg0, arg1, arg2, term) do { extern char **environ; execle((path), (arg0), (arg1), (arg2), (term), (environ)); } while (0) #define ALWAYS_NEED_ENVP 1 +#elif defined(HAVE_POSIX_SPAWN) +#define ALWAYS_NEED_ENVP 1 #else #define ALWAYS_NEED_ENVP 0 #endif