Hi,
I have a question regarding terminal I/O via /dev/tty. If a C program reads input directly from /dev/tty (not standard input) is it possible for the shell to redirect input to a C program? In other words, can the shell redirect input to /dev/tty as if the input was coming directly from the terminal?
I’m 99% sure this cannot be done, and I will write a small C program to prove it (or not). I’m just not sure at this point in time as to why the shell has this limitation. If anyone can shed light on this topic it would be greatly appreciated.
echo blabla > /dev/tty
/Sticky
I have a question regarding terminal I/O via /dev/tty. If a C program reads input directly from /dev/tty (not standard input) is it possible for the shell to redirect input to a C program? In other words, can the shell redirect input to /dev/tty as if the input was coming directly from the terminal?
I’m 99% sure this cannot be done, and I will write a small C program to prove it (or not). I’m just not sure at this point in time as to why the shell has this limitation. If anyone can shed light on this topic it would be greatly appreciated.
echo blabla > /dev/tty
/Sticky