- Start the encryption of a folder with Kleopatra
- While the encryption is in progress, kill the gpgtar process (e.g. killall gpgtar).
Kleopatra reports an error.
Kleopatra reports success.
If gpgtar is killed with SIGTERM, then the "audit log" ends with
gpgtar: signal Terminated caught ... exiting
It seems gpgtar happily exits with 0 and forgets to remove the partially written encrypted archive. The easiest solution would be to exit with a non-zero error code. Then gpgme and Kleopatra notice the error and the latter can take care of removing the left-over file.
Or, maybe the problem is that gpgme doesn't notice that gpgtar was killed. We may need an explicit "success" status, so that it's absence signals an error to gpgme.