On Sat, May 05, 2012 at 00:14, Alan Corey wrote:
> Is there a way to get the name of a file that's open when all you've
> got is a file descriptor?
> 
> I'm working on porting something, that I didn't write. with directories
> full of source.  I'm seeing a problem with an ioctl being the wrong type,
> but I'm looking at the code where it happens, I can't see what the file
> descriptor passed in is pointing to.  Seems like there should be a way.

If you ktrace the process, you can look back to see how the fd is
created.

Reply via email to