David, You're far better (from the atomicity and portability points-of-view) creating a directory instead of a file - directories can't be re-created on any filesystem I've used while files can be (so you might think you created the lock file but didn't due to a race condition).
Phil :n. On Thu, 2004-07-29 at 13:11, [EMAIL PROTECTED] wrote: > I've just dome some testing in XP. The locks are simply zero length files and > nothing more. Also, because of the random backoff approach, I think it would > be > pretty robust. To clean up any locks left over from previous attempts, a > mastster scheduler could simply remove all files in the locks directory. > Should > I post code, and a build file example? I could also submit a patch to bugzilla > with all the stuff attached. > > David > > Quoting Steve Loughran <[EMAIL PROTECTED]>: > > > > > This is interesting. File locks worry me as they can be quirky on > > platforms and across shared file systems. And on winnt workstation, > > locks never seem to get released when an app crashes (unlike winnt server). > > > > What have you tested on? > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- Phil Weighill-Smith <[EMAIL PROTECTED]> Volantis Systems