[PATCH 2/2] Re: Temporarily delete old-style lock files

Nicolas Sebrecht nicolas.s-dev at laposte.net
Tue Aug 23 19:35:00 BST 2011

On Mon, Aug 22, 2011 at 12:09:13PM +0200, Sebastian Spaeth wrote:
> On Fri, 19 Aug 2011 18:35:23 +0200, Nicolas Sebrecht <nicolas.s-dev at laposte.net> wrote:
> > > Doing all this without race conditions is something that will not be
> > > trivial. The exploitable window will be quite small, but it will exist
> > > unless we do really smart stuff.
> > 
> > I'm not seeing possible race conditions in the above.
> 1st we check for new-style locks. None there, next, we check for
> old-style lock. But in the mean time, we could have another new-style
> lock created, etc. Just locks of little places between testing for and
> creating the various lock files which makes me a little nervous. 

You might check for the old-style lock before the new one. It should be
just fine.

Nicolas Sebrecht

More information about the OfflineIMAP-project mailing list