Instead of adding extra complexity to deal with something that had become too complicated, simplify. Having veryold() conditionally close the lock file made sense when the usage was just 'if (veryold()) goto gotlock;' but didn't after that became 'if (veryold() && clearoldlocks()) goto gotlock;'. Have veryold() always leave the file open and getlock() always close it.
11 KiB
11 KiB