From 1fc94ecde5bc920d6d07c4cc91540dadbd2e4f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miha=20Frange=C5=BE?= Date: Sun, 13 Apr 2025 18:47:01 +0200 Subject: [PATCH] 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. --- libobs/util/pipe-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libobs/util/pipe-posix.c b/libobs/util/pipe-posix.c index cf97d4562..1f5e10725 100644 --- a/libobs/util/pipe-posix.c +++ b/libobs/util/pipe-posix.c @@ -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); }