libobs/util: Fix os_process_pipe_create on Linux

This fixes a regression on Linux, introduced in commit 9bc3082.

According to the POSIX specification for the exec family of commands, 
"The first argument is the filename or pathname of the executable to 
be executed". This was done correctly before, but the above commit 
removed "sh" from the arguments, breaking the pipe function on Linux.
This commit is contained in:
Miha Frangež
2025-04-13 18:47:01 +02:00
committed by Ryan Foster
parent f1e44c122c
commit 1fc94ecde5

View File

@@ -124,7 +124,7 @@ os_process_pipe_t *os_process_pipe_create(const char *cmd_line, const char *type
if (!cmd_line)
return NULL;
char *argv[3] = {"-c", (char *)cmd_line, NULL};
char *argv[4] = {"sh", "-c", (char *)cmd_line, NULL};
return os_process_pipe_create_internal("/bin/sh", argv, type);
}