I was able to further minimize the reproducer as this issue is specifically related to the way the stdin remains attached to the terminal while the script's output is being piped with sudo-rs.
install.sh: ``` #!/bin/bash apt-get install ethtool -y ``` FAILS (leads to T+ hang): $ sudo ./installer.sh | cat and $ sudo ./installer.sh </dev/tty | cat SUCCEEDS: $ sudo ./installer.sh </dev/null | cat and $ sudo apt-get install ethtool -y | cat So essentially: sudo-rs causes `apt-get install` launched from a script to be in a stopped state when the `sudo` command is used as the left side of a pipeline. The child process belongs to the foreground terminal process group and sending `SIGCONT` changes the `T+` state to `R+` which allows the installation to exit successfully. Redirecting `/dev/null` prevents the issue and running the command directly outside the script does not reproduce the issue. ** Summary changed: - sudo‑rs causes apt-get (install or upgrade)to be stopped (T+) in a non‑interactive SSH session + sudo-rs causes `apt-get install to enter `T+` when script stdout is piped and stdin is a TTY -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2150073 Title: sudo-rs causes `apt-get install to enter `T+` when script stdout is piped and stdin is a TTY To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/rust-sudo-rs/+bug/2150073/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
