Skip to content

fix: don't hang a piped guided install under sudo-rs - #94

Merged
spydisec merged 1 commit into
mainfrom
fix/guided-terminal-stop
Nov 12, 2026
Merged

spydisec merged 1 commit into
mainfrom
fix/guided-terminal-stop

Conversation

@spydisec

Copy link
Copy Markdown
Owner

Summary: on Ubuntu 26.04, curl ... | sudo sh hung 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.sh ignores that stop signal (TTIN) when sudo -V says sudo-rs. The read then fails, and install refuses with terminal_read and 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:

System sudo Piped into sudo sudo sh -c
Ubuntu 26.04 sudo-rs 0.2.13 refuses with the hint (hung before) installs
Ubuntu 25.10 sudo-rs 0.2.8 refuses with the hint installs
Ubuntu 24.04 1.9.15 installs installs
Debian 13 1.9.16 installs installs
AlmaLinux 9 1.9.17 installs installs

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>
@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d652495f-f2d6-4501-8b21-e44fe82902ad
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@spydisec
spydisec merged commit 0aaba75 into main Nov 12, 2026
30 checks passed
@spydisec
spydisec deleted the fix/guided-terminal-stop branch November 12, 2026 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant