fix: native Termux runit service backend#424
Merged
SuperCoolPencil merged 1 commit intoSurgeDM:mainfrom May 1, 2026
Merged
Conversation
8910e19 to
31010eb
Compare
Contributor
Author
|
@SuperCoolPencil could you retrigger greptile ? Thanks |
6e90915 to
9e2ee8f
Compare
9e2ee8f to
9e06c44
Compare
9e06c44 to
8ec9218
Compare
8ec9218 to
f5c589d
Compare
Contributor
Author
|
@SuperCoolPencil Done from my side, you can review from your side now :) cc @LukeGTH |
Perfect, if he releases a new version, he just needs to wait; I've set the package to update automatically |
SuperCoolPencil
approved these changes
May 1, 2026
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.
kardianos/service detects Android as a sysv platform and returns Interactive()==false, causing s.Run() to block indefinitely waiting for service control signals that never come. This made both the TUI and server commands hang on Termux -- even Ctrl+Q couldn't exit the TUI because s.Run() never reached rootCmd.Execute().
So, we platform split using Go build tags.
Fixes regression from 73bca40 (service support PR).
Greptile Summary
This PR fixes a Termux hang by platform-splitting the service backend via Go build tags: on Android,
RunService()always callsrootCmd.Execute()directly (bypassing kardianos/service which misdetects Android as sysv and blocks), while non-Android builds retain the existing kardianos/service path. A new native runit/sv backend is added for Termux service management, with correct$PREFIXandSURGE_SV_DIR/SVDIRhandling throughout.Confidence Score: 5/5
Safe to merge — the fix is well-scoped and the only findings are minor style/redundancy issues
All findings are P2. The core fix (build-tag platform split, sv() env filtering, defaultPrefix() usage) is correct. No logic errors or security concerns were found.
cmd/service_ui_termux.go — redundant double stop on uninstall; all new files missing EOF newline
Important Files Changed
Prompt To Fix All With AI
Reviews (7): Last reviewed commit: "fix: native Termux runit service backend" | Re-trigger Greptile