fix(gateway): add -- separator between setsid and bash for Termux#37137
Open
liuhao1024 wants to merge 1 commit into
Open
fix(gateway): add -- separator between setsid and bash for Termux#37137liuhao1024 wants to merge 1 commit into
liuhao1024 wants to merge 1 commit into
Conversation
…patibility POSIX requires -- to separate options destined for the child process. Without it, setsid on Termux interprets -lc as its own flags, causing command execution to fail silently. Both the detached restart and update code paths were affected. Fixes NousResearch#37124
Collaborator
Contributor
Author
|
Thanks for the heads-up, @alt-glitch. For context: this PR (#37137) was created at 2026-06-02T02:06 UTC, ~4 hours before #37240 (2026-06-02T06:17 UTC). Both fix the same Termux setsid issue (#37124) with the same approach (inserting |
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.
What does this PR do?
Adds
--separator betweensetsidandbashin both the detached restart and gateway update code paths. Without this separator, Termux'ssetsidinterprets-lc/-cas its own flags instead of forwarding them tobash, causing command execution to fail silently on Android/Termux.Related Issue
Fixes #37124
Type of Change
Changes Made
gateway/run.py: Insert"--"betweensetsid_binand"bash"in_launch_detached_restart_command()(line 3985) and_handle_update_command()(line 14821)tests/gateway/test_restart_drain.py: Update existing assertion to expect the--separator in the command listtests/gateway/test_setsid_separator.py: Add focused regression tests verifying both the setsid and non-setsid code pathsHow to Test
pytest tests/gateway/test_setsid_separator.py -v— both tests should passpytest tests/gateway/test_restart_drain.py -v— the updated assertion should passhermes gateway restartandhermes updateno longer fail silently--is a no-op on standardsetsid)Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/gateway/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/ACode Intelligence
gateway/run.py_launch_detached_restart_command()and_handle_update_command()(setsid subprocess spawning)setsidignores the extra--setsid_bin + bashinvocation pattern