Repository navigation
System: run xdg-open in the background in openURL() - #44
Merged
Merged
Conversation
openURL() passed "&" to xdg-open as a second argument, since runCommand() runs the command without a shell. xdg-open rejects the extra argument and exits with an error, which also stops the caller, as lime test html5 now does on Linux. xdg-open now runs through the shell with the URL quoted, in the background, with its output discarded, and a failure no longer stops the caller.
This was referenced Nov 24, 2026
Merged
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.
openURL()passes"&"to xdg-open as a second argument.runCommand()doesn't use a shell, so the&doesn't background anything: xdg-open rejects the extra argument, exits with an error, and the failed command stops the caller. Lime's tools now hit this on Linux, sincelime test html5serves through CrossByte and callsopenURL(). Before, node's http-server opened the browser itself, so the bug went unnoticed.xdg-open now runs through the shell with the URL single-quoted, in the background, with its output discarded. It's started with
ignoreErrors, so a failure no longer stops the caller. Windows and macOS are unchanged.Checked by running the same command string through
sh -cwith a stand-in xdg-open that records its arguments and sleeps for 5 seconds. The URLhttp://127.0.0.1:3000/?a=1&b='two words'arrives as the only argument, and the call returns in about 150 ms. The old form gave xdg-open two arguments, the URL and&. Not run on a Linux desktop with a real browser. Compiles with Haxe 3.4.7 and 4.3.7.