From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <7359f049040927175156a92c6b@mail.gmail.com> Date: Mon, 27 Sep 2004 17:51:54 -0700 From: Rob Pike To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] simple questions on bind semantics In-Reply-To: <20040928004656.GA2117@submarine> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20040928004656.GA2117@submarine> Topicbox-Message-UUID: e97d1f94-eacd-11e9-9e20-41e7f4b1d025 Because bind and mount are implemented by a simple substitution. When a walk hits a file that has been bound to, the fid is dropped and then replaced by a clone of the fid of the result of the bind. To have a fid, one needs a file, hence the fid must exist. There's nothing stopping a service from creating bind destinations on demand, and I think this has even been done in a special device(memory is vague), but fundamentally, bind needs a file to bind to. -rob On Mon, 27 Sep 2004 17:46:57 -0700, Roman Shaposhnick wrote: > I have a deja vu feeling that this might have been asked here before. > But since the mighty google disagrees here it goes: why does bind > have a restriction that old has be existent ? Basically why can't > I do: > > $ bind /some-file /new-name-for-some-file ? > > where there's no /new-name-for-some-file before the call ? > > Thanks, > Roman. >