Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close non-standard file descriptors #18

Merged
merged 1 commit into from
Apr 7, 2024
Merged

Close non-standard file descriptors #18

merged 1 commit into from
Apr 7, 2024

Conversation

norihiro
Copy link
Owner

@norihiro norihiro commented Apr 7, 2024

Description

The obs-ffmpeg-mux process cannot be terminated while the process forked by this plugin is running, which causes audio subsystem of OBS stalls. The obs-ffmpeg-mux process is terminated when an EOF appears on the pipe. However, since the forked process holds the file descriptor of the write-end of the pipe, the EOF won't arrive to the obs-ffmpeg-mux process.

This PR has the same fix as norihiro/obs-command-source#34.

How Has This Been Tested?

Tested on Linux.

  • Checked file descriptors opened by OBS are not inherited in the sub process.
  • Checked the audio arrives to OBS as usual.

General checklist

  • The commit is reviewed by yourself.
  • The code is tested.
  • Document is up to date or not necessary to be changed.
  • The commit is compatible with repository's license.

Fix #17

@norihiro norihiro added the bug Something isn't working label Apr 7, 2024
The obs-ffmpeg-mux process cannot be terminated while the process forked
by this plugin is running, which causes audio subsystem of OBS stalls.
The obs-ffmpeg-mux process is terminated when an EOF appears on the
pipe. However, since the forked process holds the file descriptor of the
write-end of the pipe, the EOF won't arrive to the obs-ffmpeg-mux
process.
@norihiro norihiro merged commit e4a3748 into main Apr 7, 2024
6 checks passed
@norihiro norihiro deleted the close_range branch April 7, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Close file descriptors at fork
1 participant