Launch bundle as subprocess instead of via Cocoa API#33
Open
maaku wants to merge 3 commits intomrmekon:masterfrom
Open
Launch bundle as subprocess instead of via Cocoa API#33maaku wants to merge 3 commits intomrmekon:masterfrom
maaku wants to merge 3 commits intomrmekon:masterfrom
Conversation
Owner
|
As with #30, I'm leaving this open and unmerged since I don't currently have a way to test it. It's most unfortunate that both automated build/CI services I was using for these projects shutdown, so I don't even get validation that they compile correctly anymore. My endless to-do list includes setting up a mac build server... someday. @maaku: you asked in the other thread if I need a maintainer, and I guess the answer is that I need a tester, at least. I'm not prepared to hand over merge permissions just yet, but I am willing to merge PRs if others assert that they are tested and working. Though, it would be good to define what "working" means... |
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.
This replaces PR #30 by @zyllian. It is exactly the same change, but without the auto formatting. I also added an example to demonstrate that stdin/stdout/stderr are captured by the parent process.
The main motivation for this change is to make
cargo run ...show the output of the running application, including logging and backtraces in the case of a panic.I ran the examples to verify that launching via the Rust standard library subprocess command instead of the Cocoa API still causes the application to be treated as a bundle. With this change, the launch services still pick up the URL registration, and my own application which uses the menu bar works as well. AFAICT the only visible effect of this PR is that the parent (unbundled) process does not terminate until the child does, and the child process inherits the same stdin/stdout/stderr file handles.
This change also has the benefit of removing one
unsafe{}block inosx.rs. The commits are split up: one makes the change, while the other removes the now unnecessary indentation (but otherwise doesn't change the code). A third commit adds theterminal.rsexample.