#249763 Stale lock files

Package:
gnucash
Source:
gnucash
Description:
personal and small-business financial-accounting software
Submitter:
Daniel Burrows
Date:
2020-11-30 17:21:09 UTC
Severity:
wishlist
Tags:
#249763#5
Date:
2004-05-19 02:21:04 UTC
From:
To:
  It's great that gnucash keeps lock files -- however, when it crashes,
a stale lock file is left behind and an ominous-looking error message is
spewed at the user the next time gnucash starts.

  I suggest:

  - encoding the hostname/PID into the lockfile so that stale lockfiles
    from $HOST can be easily detected (if the PID that locked the file
    no longer exists, you don't have to worry)

  - mentioning in the warning pop-up that the lock-file might be from an
    old crashed instance of the program.  If the hostname is stored,
    display it so that they can try to find the program and kill it.

  - rewording "another user" somehow, since it could -- and almost
    always will -- be the user who is seeing the message that locked
    the file.

  For instance:

    Gnucash could not obtain the lock for <blah>; it is being used by
    process <pid> on the computer <host>.  This may be because Gnucash
    crashed and left a lock file behind, but it could be that another
    instance of Gnucash is using this file already.

    What would you like to do?

  Daniel