Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!decvax!harpo!seismo!hao!hplabs!sri-unix!guyton@rand-unix From: guyton%rand-unix@sri-unix.UUCP Newsgroups: net.unix Subject: Re: file descriptors --> filenames Message-ID: <16848@sri-arpa.UUCP> Date: Mon, 27-Feb-84 00:30:00 EST Article-I.D.: sri-arpa.16848 Posted: Mon Feb 27 00:30:00 1984 Date-Received: Fri, 2-Mar-84 08:03:03 EST Lines: 19 From: James_GuytonThe only "practical" way of doing this is to hang onto the filename yourself when you do the open (and forget it when you close). This isn't a general solution for Unix programs (since you can be passed open files via stdin, stdout, stderr, pipes, etc.), but if you're converting a pgm from RSX, that shouldn't be a problem for you. You might also run into problems if the program ever changes its current working directory after an open. I suggest having an array of strings indexed by the real file descriptor ("fileno" of the FILE argument). Use the variable NOFILE out of for the size of the array. -- Jim