Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!gatech!rutgers!dptg!att!cbnewsl!dune From: dune@cbnewsl.ATT.COM (Greg Pasquariello) Newsgroups: comp.unix.wizards Subject: Re: how can I get filename from file descriptor? Message-ID: <1586@cbnewsl.ATT.COM> Date: 23 Aug 89 13:07:09 GMT References: <19208@mimsy.UUCP> Reply-To: dune@cbnewsl.ATT.COM (Greg Pasquariello) Organization: AT&T Bell Laboratories Lines: 17 In article <19208@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: :In article <20482@sequent.UUCP> paulr@sequent.UUCP (Paul Reger) writes: ::What I mean is this ... ::Have the FILE structure have a name field in it: :: char *name; ::then when the fopen() call is made, have it fill in the field .... : :This is all well and good, but you will have to define what happens :when you ask for the name of stdin, stdout, stderr, or a file opened :In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) You also need to take into account actions on the fd itself, such as unlink(fileno(fd)). Greg Pasquariello att!picuxa!gpasq