Results 1 to 1 of 1
Thread: How to get file name from fd
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Jun 2006
- Silicon valley of India
How to get file name from fd
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