[Chicago] help with file locking

Martin Maney maney at two14.net
Sat Mar 3 05:12:52 CET 2012

On Wed, Feb 29, 2012 at 12:43:56PM -0600, Massimo Di Pierro wrote:
> Thank you! This helps a lot.

I think there's another problem with a race in the code.  Unlocking
before closing means that, at least in theory, the reader could open,
lock, and read the file between the writer's unlock and close, at which
time the new content hasn't been flushed from the buffers into the OS
(I was going to say "to disk", but unless you explicitly sync this sort
of constantly-changing test file may never get to disk at all).

Self-pity can make one weep, as can onions.  -- Fodor

More information about the Chicago mailing list