Repository navigation
fix: don't hang a piped guided install under sudo-rs - #94
Merged
Merged
Conversation
0.5.3 made a failed terminal read a refusal. That covers sudo-rs 0.2.8 on Ubuntu 25.10, where the read fails. Under sudo-rs 0.2.13 on Ubuntu 26.04 the read doesn't fail. The script runs in the background of the terminal, so the kernel stops it when it reads the keyboard, and the install hangs. install.sh now ignores that stop signal when sudo is sudo-rs. The read then fails, and the script refuses with terminal_read and the hint. The classic sudo moves a stopped script to the foreground, so the signal is left alone there, and the piped form keeps working. Tested through a terminal in containers. Ubuntu 26.04 and 25.10 refuse the piped form with the hint and install with sudo sh -c. Ubuntu 24.04, Debian 13 and AlmaLinux 9 install with both forms. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Summary: on Ubuntu 26.04,
curl ... | sudo shhung at the first question. It now refuses with the same hint as on Ubuntu 25.10.Cause
#93 made a failed terminal read a refusal. That covers sudo-rs 0.2.8 on Ubuntu 25.10, where the read fails. Under sudo-rs 0.2.13 on Ubuntu 26.04 the read doesn't fail. The piped script runs in the background of the terminal, so the kernel stops it when it reads the keyboard, and it stays stopped.
Fix
install.shignores that stop signal (TTIN) whensudo -Vsays sudo-rs. The read then fails, and install refuses withterminal_readand the hint.The classic sudo moves a stopped script to the foreground, so the piped form works there. A first version ignored the signal everywhere, and that broke the piped form on Ubuntu 24.04, so the signal is left alone unless sudo is sudo-rs.
Tested
Guided install through a real terminal in containers, with
--skip-load:sudo sh -c