From 90d158cf17f10a8287837f523ce7a0596a30c055 Mon Sep 17 00:00:00 2001 From: Norihiro Kamae Date: Thu, 22 May 2025 23:44:10 +0900 Subject: [PATCH] libobs/util: Fix coprocess not having environment variables --- libobs/util/pipe-posix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libobs/util/pipe-posix.c b/libobs/util/pipe-posix.c index 1f5e10725..1b8afc517 100644 --- a/libobs/util/pipe-posix.c +++ b/libobs/util/pipe-posix.c @@ -24,6 +24,8 @@ #include "bmem.h" #include "pipe.h" +extern char **environ; + struct os_process_pipe { bool read_pipe; int pid; @@ -88,7 +90,7 @@ os_process_pipe_t *os_process_pipe_create_internal(const char *bin, char **argv, posix_spawn_file_actions_adddup2(&file_actions, errfds[1], STDERR_FILENO); int pid; - int ret = posix_spawn(&pid, bin, &file_actions, NULL, (char *const *)argv, NULL); + int ret = posix_spawn(&pid, bin, &file_actions, NULL, (char *const *)argv, environ); posix_spawn_file_actions_destroy(&file_actions);