libobs/util: Fix os_process_pipe_create on Linux #12049
Open
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
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.
Motivation and Context
In OBS 31.0.3 on GNU/Linux, the os_process_pipe_create function fails silently, as the /bin/sh shipped with most Linux distros "eats" the first argument and so no program is launched.
How Has This Been Tested?
Compiled and used for a day in production. Given that this is essentially a revert of one line back to 30.1.0, you could say it has been tested quite extensively.
OS: Arch Linux
Used plugins: websocket, NDI, obs-ssp (my fork, this is where I discovered the issue)
Types of changes
Checklist: