Error Generating ElGamal Key

Rich Wales richw at
Wed Feb 24 07:35:34 CET 1999

Matthew Copeland wrote:

	MC > gpg: waiting for lock (hold by 21285 - probably dead) ...

Werner Koch replied:

	WK > Can you please try to figure out what process 21285 used
	WK > to be and have a look at the timestamps of ~/.gnupg/* -
	WK > is the lockfile too old.  

I've run into the same bug many times when trying to edit two or more
keys in succession.  Each time, a lock was left on my public keyring
(pubring.gpg.lock) after editing the first key.

As best I could tell, the PID named in this lock file (while running
the second "gpg --edit-key" command) was the PID of the first "gpg
--edit-key" command.

Presumably, the key editing code is neglecting to remove the lock in
certain situations.

Also, the code that checks for stale lock files -- make_dotlock() in
util/dotlock.c -- tests for a dead process and inserts "probably dead"
into the "waiting for lock" message, but the stale lock is not removed.

In case it matters, I'm running on a FreeBSD 2.2.8 system.

Rich Wales         richw at
See for my PGP key and fingerprint info
*** NOTE: any key generated by me before 1997-09-18 has been REVOKED ***

More information about the Gnupg-devel mailing list