Sudo-rs hangs when you suspend a process with ^Z
With original sudo: sudo vi, press ^Z -> you drop to the shell.
With sudo-rs: the process does get suspended, but the process seems stuck. This is probably something with the signal handling? (We should wait for use_pty to be supported before fixing this)
Yeah this sounds like something that should be fixed in the use_pty case before trying to fix it not.
That being said exec_nopty.c has a special case for SIGTSTP with the following documentation:
/*
* Only forward user-generated signals not sent by a process other than
* the command itself or a member of the command's process group (but
* only when either sudo or the command is the process group leader).
* Signals sent by the kernel may include SIGTSTP when the user presses
* ^Z. Curses programs often trap ^Z and send SIGTSTP to their own
* process group, so we don't want to send an extra SIGTSTP.
*/
but this particular behavior is already implemented already on main so it is either wrong or there's another catch somewhere.
exec_pty.c does some special handling for SIGTSTP too so this will be relevant even after use_pty gets merged.
Edit: I pressed "Close issue" instead of "Comment" :sweat_smile:
Current behavior: ^Z doesn't even suspend the process