Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!rutgers!att!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.unix.wizards Subject: Re: how can I get filename from file descriptor? Message-ID: <9619@chinet.chi.il.us> Date: 19 Sep 89 18:59:45 GMT References: <9353@chinet.chi.il.us> <1639@cbnewsl.ATT.COM> <10850@smoke.BRL.MIL> <14280@super.ORG> <11099@smoke.BRL.MIL> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Organization: Chinet - Public Access Unix Lines: 18 In article <11099@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: >->If your pipe implementation is any good (most are not), simply write 0 >->bytes to it. >I did say that most pipe implementations don't support this. [...] >I don't know whether or not the various flavors of streams do. >Personally I think they should. Better yet, make all of the "magic" properties of "first open" and "last close" available via fcntl() or ioctl() depending on whether it is file magic or device magic. Then if the /dev/tty approach is generalized to /dev/fdn, you could do anything to an inherited file descriptor that you could if you had the name except rename/move/remove it. Do the current implimentations of /dev/fd allow you to chmod(/dev/fd4,mode)? Les Mikesell