how can I get filename from file descriptor?

Chris Torek chris at mimsy.UUCP
Tue Aug 22 23:17:12 AEST 1989


In article <20482 at sequent.UUCP> paulr at 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 at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list