Closed vincentbernat closed 11 months ago
Hey!
Since 1.9.15, sudo -l ls > /dev/null locks the sudo process on fcntl(1, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_CUR, l_start=0, l_len=0}). I believe this is because of the tentative to avoid multiple sudo processes to modify the terminal settings.
sudo -l ls > /dev/null
fcntl(1, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_CUR, l_start=0, l_len=0})
Locking /dev/null on Linux always seems to block, which is an interesting choice. Only locking if the fd is actually a tty fixes the problem.
The fix is present in sudo 1.9.15p3
Hey!
Since 1.9.15,
sudo -l ls > /dev/null
locks the sudo process onfcntl(1, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_CUR, l_start=0, l_len=0})
. I believe this is because of the tentative to avoid multiple sudo processes to modify the terminal settings.