Ubuntu 26.04's sudo-rs leaves ghost processes when SSH drops during sudo su
Ubuntu 26.04 replaced the traditional sudo with sudo-rs, a Rust-based implementation, which handles SIGHUP signals differently when SSH connections drop. A developer discovered that using 'sudo su' over SSH on Ubuntu 26.04 left orphaned processes running indefinitely after the connection closed, reparented to PID 1. Investigation revealed that su blocks SIGHUP, and unlike traditional sudo, sudo-rs lacks cleanup logic to terminate child processes when the terminal disconnects. Switching back to the traditional sudo implementation resolved the issue, confirming sudo-rs is the key difference. Users are advised to use 'sudo -i' or 'sudo -s' instead of 'sudo su', as these alternatives exit cleanly when an SSH session ends.







