I need to redirect the process A's standard output to B's standard input.
Problem is A and B aren't directly related and can't be written down on the same pipeline of bash script (A | B).
Looking for solutions, I read about those file descriptors in /proc/<pid>/fd/ which promise to pipe directly into the process interface, but I did't get too much far.
If I push text trough any of them, that text apperas on the receiving process' console, but isn't interpreted, like if it was passed as output instead of as input.
In my concrete machine, B, the receiving process, is gimp-console, and A, the output-generator, is a generic script; other combinations of processes behaved the same way.
I noticed that file-descriptors 0 1 2 point to the same special-file; don't know if that's sane:
Code:
$ ls -l /proc/`pidof gimp-console`/fd/
total 0
lrwx------ 1 davide davide 64 Mar 17 20:48 0 -> /dev/pts/0
lrwx------ 1 davide davide 64 Mar 17 20:48 1 -> /dev/pts/0
l-wx------ 1 davide davide 64 Mar 17 20:48 10 -> pipe:[261933]
lrwx------ 1 davide davide 64 Mar 17 20:48 2 -> /dev/pts/0
lr-x------ 1 davide davide 64 Mar 17 20:48 3 -> pipe:[261925]
lr-x------ 1 davide davide 64 Mar 17 20:48 4 -> pipe:[261929]
l-wx------ 1 davide davide 64 Mar 17 20:48 5 -> pipe:[261929]
l-wx------ 1 davide davide 64 Mar 17 20:48 6 -> pipe:[261926]
lr-x------ 1 davide davide 64 Mar 17 20:48 7 -> pipe:[261932]