Unify open folder - #770
Merged
Merged
Conversation
The double fork method has some issues, notably that it is quite fragile and that any errors that occur while spawning the process, e.g. that no executable can be found with the requested name, are swallowed. Instead, we use the saner workaround with a polling daemon thread that simply polls all our spawned processes every 5 seconds to reap them if they have exited. This has all the functionality that we desire with the cost of just a simple background thread that does nothing most of the time. Fixes #525 Fixes #508
The code is identical for all UIs with the exception of determining the show id and error reporting, so we move the common functionality to the engine and to a new small helper method in utils that defers to `spawn_process` (to re-use our already existing code to prevent zombie processes). Follow-up to #726
Owner
|
lgtm. |
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.
Continues the work of #727 but in a simpler fashion (as suggested in the review comments).
Since the code is identical for all UIs with the exception of determining the show id and error reporting, we move the common functionality to the engine and to a new small helper method in utils that defers to
spawn_process(to re-use our already existing code to prevent zombie processes).Because I had problems with the double-fork code for xdg-open here (unlike with mpv when playing episodes), I switched it to a different method that launches subprocesses normally via subprocess but also added a daemon thread to poll our created subprocesses and thus prevent them from remaining as zombies on *NIX OSes.
Supersedes and closes #727
Fixes #525
Fixes #508