Repository navigation
libobs/util: Prevent leaking pipe file descriptors to subprocesses - #10574
Merged
Merged
Conversation
exeldro
force-pushed
the
pipe_file_descriptor
branch
from
April 19, 2024 19:45
3ea1c36 to
de87590
Compare
kkartaltepe
approved these changes
Apr 19, 2024
Collaborator
|
Nit, commit message is probably better as Add CLOEXEC to muxer pipes, or Prevent leaking muxer pipes to subprocesses, etc. Works on linux for ffmpeg av1 in my tests. |
exeldro
force-pushed
the
pipe_file_descriptor
branch
from
April 20, 2024 06:26
de87590 to
cd6029f
Compare
Lain-B
approved these changes
Apr 20, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Set
FD_CLOEXECfile descriptor flag for the pipes created byos_process_pipe_createMotivation and Context
Since #10070 obs-ffmpeg-mux can get in a state that it does not close.
os_process_pipe_destroywaits till the process ends. The obs-ffmpeg-mux process is terminated when an EOF appears on thepipe. However, forked process hold the file descriptor of the write-end of the pipe, the EOF won't arrive to the obs-ffmpeg-mux process.
Prevent plugins needing code to close all file descriptors like norihiro/obs-command-source@f4e9b26
How Has This Been Tested?
On Mac with the source record plugin
Types of changes
Checklist: