Is it possible to get filename from file descriptor ?

S.Kumar kumar at gtenmc.UUCP
Sat Sep 15 08:55:36 AEST 1990


    A Unix question
    Is there a way to get the filename in UNIX given the file descriptor.
    (in a given process)

    I think the crash program provides a list of inodes for the filenames
    which the process has opened. 

    Is there any call in unix which would do the job  (and if not why not)?

    I don't mind an external suid program which takes the pid and fd
    and gets the filename. 
    Is it possible at all to do that ?

    (This would be very useful to me to find out the filename which
    tmpfile() has created which I could then pass to other programs)

Fri Sep 14 15:53:41 PDT 1990
    Thanks in advance ,
    S. Kumar



More information about the Comp.unix.internals mailing list