Hello all,
Can we get the file name from the fd that is present from linux (in C)?

Actually my requirement is to write from one process to another's STDOUT and read from another STDIN. In case they are just terminals then ttyname(1/0) will work to get the device files.

But in case they are files (in HDD) then can we get the file name from the already open file descriptors?

Any help would be very helpful
Thanks,
KK