[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is this a bug in gpg, mutt, or what?



On Fri, May 19, 2000 at 02:48:57AM +0200, Peter Palfrader wrote:
> Hi Ethan!
> 
> > the best solution IMO is for gpg to cleanup its lockfiles when it gets
> > an interupt.
> 
> If GPG encounters a locked keyring, it checks wheter the process that
> issued the lock (the pid is stored in the lockfile) still runs.
> 
> If that process does not exist any more it writes "probably dead". The
> problem (afaik) can be that the lock was issued on a different box so
> that the process is still running on that other computer. In this case
> it would be a stupid idea to simply remove the lock and continue work.
> 
> It should be really easy to also store a mashine dependend id
> (gethostid(2) comes to my mind) in the lock file.
> 
> If the pid saved in a lock file does not exist any more and mashine id
> is the same then gpg should (IMHO) remove the lockfile (perhaps
> printing something to stderr) and continue as usual.

this is true but what i am thinking of for solving the interupt
problems i seem to see is something like this (as we do in shell
scripts)

trap "rm -f $LOCK" 2

that won't solve things like segfaults and such but it would help.  i
think your hostname idea is great too.


-- 
Ethan Benson
http://www.alaska.net/~erbenson/



Reply to: