gpgme_cancel() does not stop gpg process from finishing
asynchronous call
Igor Belyi
gpgme at katehok.ac93.org
Sun Apr 17 00:03:40 CEST 2005
Marcus Brinkmann wrote:
>Well, I could still apply your patch as a temporary work-around ;) I
>will consider it. That it doesn't touch any external interfaces etc
>makes it easier for me.
>
>
Additional thought - sending TERM signal should be no worse than a user
hitting Control-C while working with gpg directly.
>Just to be sure: cancel in GPGME does work, right? It's just that the
>gpg process keeps running until it completed its key generation,
>right? That's not too bad - key generation is not a common operation,
>and most users probably won't even notice that the computer keeps
>being busy for a couple of seconds draining the entropy pool after
>hitting that cancel button...
>
>So, the negative impact of this problem seems to be rather small to me.
>
>
Yes, cancel works with other functions. And yes, users won't notice the
computer being busy for a couple of seconds after canceling key
generation... until they look next time at their keyring and find their
unwanted key. Plus, I've run into this problem while debuging my program
and showing my computer to a croll with a banch of outstaning gpgs.
Keep in mind that all other gpgme_*_start functions work with Data()
objects - so you have control in your program to avoid writting this
Data() to the disk if you know that user canceled the work. With key
generate - the most you can do for a user - wait until this unwanted key
is generated and then silently delete it (if you able to distinguish it
from legitamate keys).
Cheers,
Igor
More information about the Gnupg-devel
mailing list