Let's say that I start a
cat process to wait for some input. e.g.,
$ cat > out.log
In another terminal, I can identify its PID and feed data into its File Descriptor 0 (zero = STDIN), like this:
$ echo "hello" > /proc/2357/fd/0
And then the first terminal reacts:
$ cat > out.log hello
A couple of questions:
1)The "hello" string shows up in the actual terminal instead of being redirected to the file, is that due to the nature of the
cat program (it just focuses on the tty/foreground)?
2) I can't tail the STDOUT of that same process:
tail -f /proc/2357/fd/1 ...
Nothing shows up. Any conjectures on what is going on here?