Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!mailrus!ames!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: how can I get filename from file descriptor? Message-ID: <19208@mimsy.UUCP> Date: 22 Aug 89 13:17:12 GMT References: <20613@adm.BRL.MIL> <1019@virtech.UUCP> <20482@sequent.UUCP> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 13 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 with fdopen. (Also, but rather incidentally, I am not terribly thrilled with the idea of fopen having to call getwd.) -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris