On Mon, Apr 09, 2018 at 10:30:58AM -0400, Gene Heskett wrote:
> On Monday 09 April 2018 09:51:37 Greg Wooledge wrote:
> > As others have explained, the OS (Linux) keeps a cache of file
> > contents that have been written by applications, but not yet committed
> > to permanent storage.  If you "save" from within the text editor, then
> > the saved contents should be immediately visible to other processes
> > reading the file, regardless of whether it has been synced to disk. 
> > They'll simply get the cached version.
> 
> Which is not happening after several hours and a hundred or more edits. 
> Which is why its so intermittent.

This is why some people are guessing that the problem lies in the
text editor -- it hasn't *actually* saved the content (via kernel
write() calls) yet.

Of course there are many other possible explanations.  You might have
thought you saved, but you actually didn't (classic PEBKAC).  You might
be catting the wrong file, different from the one that's being edited.
The editor might have been invoked to edit a temporary file within some
kind of version control environment, with your changes not actually
being submitted to the VCS until the editor terminates.

It's unlikely to be an issue with the actual storage hardware.

Reply via email to