Skip to content

Commit 90d158c

Browse files
norihiroRytoEX
authored andcommitted
libobs/util: Fix coprocess not having environment variables
1 parent 32f1b93 commit 90d158c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libobs/util/pipe-posix.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include "bmem.h"
2525
#include "pipe.h"
2626

27+
extern char **environ;
28+
2729
struct os_process_pipe {
2830
bool read_pipe;
2931
int pid;
@@ -88,7 +90,7 @@ os_process_pipe_t *os_process_pipe_create_internal(const char *bin, char **argv,
8890
posix_spawn_file_actions_adddup2(&file_actions, errfds[1], STDERR_FILENO);
8991

9092
int pid;
91-
int ret = posix_spawn(&pid, bin, &file_actions, NULL, (char *const *)argv, NULL);
93+
int ret = posix_spawn(&pid, bin, &file_actions, NULL, (char *const *)argv, environ);
9294

9395
posix_spawn_file_actions_destroy(&file_actions);
9496

0 commit comments

Comments
 (0)