Web lists-archives.com

Re: A Basic Mount Observation

On 5/7/19, tomas@xxxxxxxxxx <tomas@xxxxxxxxxx> wrote:
> On Tue, May 07, 2019 at 11:20:57AM -0400, Dan Ritter wrote:
>> Martin McCormick wrote:
>> > 	I may just be remembering things the wrong way [...]
> [about not immediatlely "seeing" the results of a mount on the CWD]
> [...]
>> mkdir point
>> cd point
>> touch original
>> ls
> [practical demonstration illustrating that]
>> This behavior has always been consistent in Linux, as far as I am aware.
>> The handle to your current directory cannot be changed out from
>> underneath you; only when you move away from it can it be
>> released, and from then on you see the new mount.
> Makes sense: the current shell (and that is from where we're looking
> at things) keeps the current working directory, CWD, open. This inode
> doesn't go away after a mount -- thus as long as the shell doesn't
> close it (by, e.g., changing to another directory), it will keep
> "seeing" that directory, even if a new process doing an open() will
> "see" the result after the mount.
> You can achieve similarly funny results by removing a file (or directory)
> while it's kept open by a process.

Okayyyy.. It sounds like this is a good training point for learning
interoperability that's occurring if there's any way to... maybe point
to images or something that help drive that point on home. I'm almost
already fully grasping at this second because I just worked my own
thought process via terminal. I'm going to reread the above a few more
times then wait for that Linux operation that finally draws it all
together enough to invoke an *ah-HAAA* moment. :)

Cindy :)
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with birdseed *