You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sudo breaks scripts that use "read" command to prompt users for input. #3223
I've written a script that uses the read command to prompt the user for information. If I run the script as a normal user, or as root, it works as expected. But if I run the script with sudo, it throws an error message:
fish: Couldn't grab control of terminal
tcsetpgrp: Interrupted system call
...Which is similar to the original post in issue #1258, but possibly for different reasons? Running the script as root instead of via sudo is a workable, if maybe inconvenient workaround.
Here is a simple example script if you need to test:
#!/usr/bin/fishecho"Who are you?"read-x username
echo"Hello, $username!"
Activity
faho commentedon Jul 13, 2016
It seems similar enough to me that I'll close this one as a duplicate. Thanks!