Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site drivax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!houxm!vax135!cornell!uw-beaver!tektronix!hplabs!amdahl!drivax!alan From: alan@drivax.UUCP (Alan Fargusson) Newsgroups: net.unix-wizards Subject: Re: r/w access to fd from creat() + new question Message-ID: <142@drivax.UUCP> Date: Wed, 15-May-85 23:28:47 EDT Article-I.D.: drivax.142 Posted: Wed May 15 23:28:47 1985 Date-Received: Fri, 24-May-85 02:04:33 EDT References: <738@plus5.UUCP> Organization: Digital Research, Monterey, CA Lines: 19 > It has been my experience that the file descriptor returned from a successful > invocation of creat() is writaable but not readable, regardless of the mode > specified to creat(). I have thought that this characteristic is nieve. You can get around it by doing a creat followed by an open. Of course you can only have 10 open files unless you remember to close the fd returned by the create. Now for my question (in the same vain). Why do things like chmod, and link, take a path name, not a fd? I understand that unlink needs a path name because it is an operation on a directory as much as on a file. But link has to take a path name and open it in a way, then make the link. I have had one case where I had to save a file name so I could pass it to link where I had the fd. But this could fail if someone unlinked the file while I had it open. -- Alan Fargusson. { ihnp4, sftig, amdahl, ucscc, ucbvax!unisoft }!drivax!alan