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 #34

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Close non-standard file descriptors #34

merged 1 commit into from
Apr 3, 2024

Conversation

norihiro
Copy link
Owner

@norihiro norihiro commented Apr 3, 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.

How Has This Been Tested?

Tested on Linux and macOS.

  1. Start recording.
  2. Trigger a command sleep 60 from this plugin.
  3. Stop recording.
  4. Check the recording stops immediately. (before this fix, it takes 1 minutes because there is sleep 1m).

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.

@norihiro norihiro added the bug Something isn't working label Apr 3, 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 f4e9b26 into main Apr 3, 2024
8 checks passed
@norihiro norihiro deleted the close_range branch April 3, 2024 05:38
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.

1 participant