[PATCH 07/17] Rework lock/pidfile. Make ui class var of OfflineImap
Rob Browning
rlb at defaultvalue.org
Thu Dec 2 05:47:22 GMT 2010
Sebastian Spaeth <Sebastian at SSpaeth.de> writes:
> Remove lock and pid files after running offlineimap.
> Make the ui a class variable of OfflineImap.
> Use a different lock file than the 'original' offlineimap
> The old offlineimap never ever deleted the lock file, so our new offlineimap fails thinking it is still being locked. Use a different lock file location. NEVER RUN the old and the new offlineimap at the same time now.
Perhaps I misunderstand, but wouldn't it be safer to continue using the
same lock file, and just print a warning (explaining how to fix the
problem) and exit if the lock file exists? i.e.:
$ offlineimape
ERROR: exiting because foo/lock exists. If you are *certain* that
offlineimap is not running, please delete the file and try again.
If it's too much to ask the user to delete the file manually,
offlineimap could always provide a --force-lock option.
I'm just wary of the approach described above because it sounds like the
failure case could be catastrophic with respect to the user's data.
Hope this helps
--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
More information about the OfflineIMAP-project
mailing list