getcwd() and friends. (Really initiating files)

Dave Brown dave at lethe.UUCP
Mon Apr 10 06:48:44 AEST 1989


In article <3746 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
| How about O_TOKEN which returns a fd you can't do anything to until you
| do another open on it. Soirt of like an RMX file token or an AmigaDOS
| file lock. Have to call the fd version of open something other than
| fopen or fdopen, though.
| ...
| Do this cleverly enough and almost all the regular calls can actually use
| the new calls... you just need to keep 'open' around so you can get the
| fd in the first place:

  Good idea. Historically, Unix made open out of "initiate" and "open", 
(since one rarely initiates a file without opening it), and allowed most
operations on the file be done via a fd or a filepointer.
  It might make some sense to reinvent initiate, but I like the idea
of an O_DONT_YOU_DARE_OPEN_THAT mode to open...
  --dave


-- 
David Collier-Brown,  | {toronto area...}lethe!dave
72 Abitibi Ave.,      |  Joyce C-B:
Willowdale, Ontario,  |     He's so smart he's dumb.
CANADA. 223-8968      |



More information about the Comp.unix.wizards mailing list