git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@351
be28352e-c001-0410-b1a7-
c7978e42abec
try {
advisory=new NativeLock(_lock, block);
} catch (Exception e) {
- log.fatal("Failed to create advisory lock file "+_lock,e);
- throw new Error("Failed to create advisory lock file "+_lock);
+ if (!_lock.exists()) {
+ // advisory cannot be created. this is serious.
+ log.fatal("Failed to create advisory lock file "+_lock,e);
+ throw new Error("Failed to create advisory lock file "+_lock);
+ }
}
return advisory.isLocked();
}